aboutsummaryrefslogtreecommitdiffstats
path: root/backend/models (follow)
Commit message (Collapse)AuthorAgeLines
* Add webhook thread ID to form modelGravatar Joe Banks2025-05-31-0/+10
|
* Move unittest filtering to the Form.dict() functionGravatar Chris Lovering2024-07-09-7/+9
|
* Apply fixable lint settings with RuffGravatar Joe Banks2024-07-08-99/+99
|
* Fix ANN401 Linting FailuresGravatar Hassan Abouelela2022-07-20-2/+2
| | | | Signed-off-by: Hassan Abouelela <[email protected]>
* Allow Setup For UnittestsGravatar Hassan Abouelela2022-06-24-2/+4
| | | | | | | | | | Adds the setup method as a special method for unittest question types. Additionally, a couple QoL fixes are included. I changed `unit` to `self` to clarify what it actually is, and I changed an `lstrip` to a `removeprefix` to avoid removing unintentional portions of the name (for instance `something` -> `omething`) Signed-off-by: Hassan Abouelela <[email protected]>
* Fix Linting ErrorsGravatar Hassan Abouelela2022-02-05-2/+2
| | | | Signed-off-by: Hassan Abouelela <[email protected]>
* Add Role Based Editors To FormsGravatar Hassan Abouelela2022-02-05-1/+2
| | | | | | Adds the ability to specify who can edit forms using discord roles. Signed-off-by: Hassan Abouelela <[email protected]>
* Add Role Based Authorized ReadersGravatar Hassan Abouelela2022-02-05-2/+10
| | | | | | | Adds a new property on forms to declare which roles are authorized to access form responses. Signed-off-by: Hassan Abouelela <[email protected]>
* Overhaul Scope SystemGravatar Hassan Abouelela2022-02-05-1/+13
| | | | | | | Adds discord role support to the pre-existing scopes system to power more complex access permissions. Signed-off-by: Hassan Abouelela <[email protected]>
* Add Helper Functions For Managing RolesGravatar Hassan Abouelela2022-01-22-2/+63
| | | | Signed-off-by: Hassan Abouelela <[email protected]>
* Model: makes Form.id case insensitiveGravatar Matteo Bertucci2021-12-26-2/+2
| | | | Note that it will make any existing form with an upper case letter impossible to access until its ID is changed, which shouldn't be the case in production according to @HassanAbouelela
* Clarify Validator SemanticsGravatar Hassan Abouelela2021-06-03-1/+1
| | | | | Co-authored-by: Chris <[email protected]> Signed-off-by: Hassan Abouelela <[email protected]>
* Adds Missing DocstringsGravatar Hassan Abouelela2021-06-02-0/+3
| | | | Signed-off-by: Hassan Abouelela <[email protected]>
* Adds Code Question ModelGravatar Hassan Abouelela2021-06-02-1/+25
| | | | | | | Adds an explicit model for questions of type `code`, to allow more complex parsing. Updates schema docs. Signed-off-by: Hassan Abouelela <[email protected]>
* Add back removed parenthesisGravatar ks1292021-03-16-1/+1
|
* Split if statement to multiple lines to avoid noqaGravatar ks1292021-03-16-1/+4
|
* Split public fields constant to multiple linesGravatar ks1292021-03-16-1/+9
|
* Use value of enum member instead of member itselfGravatar ks1292021-03-16-3/+3
|
* Add discord_role to public fieldsGravatar ks1292021-03-16-1/+1
|
* Add missing "is" to error messageGravatar ks1292021-03-09-1/+1
| | | Co-authored-by: Hassan Abouelela <[email protected]>
* Merge branch 'main' into ks123/role-assigningGravatar ks1292021-01-23-1/+2
|\
| * Add an optional submitted_text field to forms to customize the response upon ↵Gravatar Jannes Jonkers2021-01-20-2/+2
| | | | | | | | submitting.
| * Add an optional response field to forms to customize the response upon ↵Gravatar Jannes Jonkers2021-01-20-1/+2
| | | | | | | | submitting.
* | Fix too long lineGravatar ks1292020-12-29-1/+3
| |
* | Add check for REQUIRES_LOGIN when ASSIGN_ROLE providedGravatar ks1292020-12-29-2/+6
| |
* | Add validator for Discord role field for formGravatar ks1292020-12-29-1/+11
| |
* | Add discord_role field to form and it's schemaGravatar ks1292020-12-29-0/+1
|/
* Add required field to question modelGravatar ks1292020-12-28-0/+1
|
* Dedents Webhook ObjectGravatar Hassan Abouelela2020-12-22-8/+2
| | | | | | | Removes the meta object, and moves the webhook object under the main form object to reduce nesting. Signed-off-by: Hassan Abouelela <[email protected]>
* Merge branch 'main' into big-int-fixGravatar Joe Banks2020-12-21-1/+75
|\
| * Merge branch 'main' into discord-webhookGravatar Hassan Abouelela2020-12-21-1/+0
| |\ | | | | | | | | | | | | | | | | | | Signed-off-by: Hassan Abouelela <[email protected]> # Conflicts: # backend/routes/forms/submit.py
| * | Adds Missing AnnotationGravatar Hassan Abouelela2020-12-18-1/+1
| | | | | | | | | | | | Signed-off-by: Hassan Abouelela <[email protected]>
| * | Runs Initial Validation AsynchronouslyGravatar Hassan Abouelela2020-12-18-32/+55
| | | | | | | | | | | | | | | | | | | | | Moves the validation code of webhook urls to an async function that is called by the route, to avoid blocking code. Signed-off-by: Hassan Abouelela <[email protected]>
| * | Sends Embed AsynchronouslyGravatar Hassan Abouelela2020-12-18-1/+1
| | | | | | | | | | | | Signed-off-by: Hassan Abouelela <[email protected]>
| * | Merge branch 'main' into discord-webhookGravatar Hassan Abouelela2020-12-17-3/+19
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Hassan Abouelela <[email protected]> # Conflicts: # backend/routes/forms/submit.py
| * | | Makes Webhooks OptionalGravatar Hassan Abouelela2020-12-17-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes a bug that would force you to do a dummy webhook object when creating a form. Fixes a bug that would force you to add an empty message for webhooks. Signed-off-by: Hassan Abouelela <[email protected]>
| * | | Merge branch 'main' into discord-webhookGravatar Hassan Abouelela2020-12-17-1/+14
| |\ \ \
| * | | | Adds Webhook OptionGravatar Hassan Abouelela2020-12-17-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds webhook option on form creation, and adds validation. Updates `SCHEMA.md`. Signed-off-by: Hassan Abouelela <[email protected]>
* | | | | Remove validator importGravatar ks1292020-12-21-1/+1
| | | | | | | | | | | | | | | Co-authored-by: Joe Banks <[email protected]>
* | | | | Remove unnecessary validatorGravatar ks1292020-12-21-8/+0
| | | | | | | | | | | | | | | Co-authored-by: Joe Banks <[email protected]>
* | | | | Remove unnecessary comment about IDGravatar ks1292020-12-21-2/+0
| | | | | | | | | | | | | | | Co-authored-by: Joe Banks <[email protected]>
* | | | | Convert user IDs to string to avoid JS bad behavioursGravatar ks1292020-12-21-3/+13
| |_|_|/ |/| | |
* | | | Remove DNS blacklist field from antispam modelGravatar ks1292020-12-18-1/+0
| |_|/ |/| |
* | | Merge branch 'main' into docs/api-specGravatar ks1292020-12-17-1/+14
|\ \ \ | | |/ | |/|
| * | Update backend/models/form_response.pyGravatar Hassan Abouelela2020-12-17-1/+1
| | | | | | | | | Co-authored-by: ks129 <[email protected]>
| * | Fixes DB Timestamp on ReturnGravatar Hassan Abouelela2020-12-17-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | As pointed out by @ks129, fetching the responses would cause an error in the timestamp, as the validation was returning the current time at fetching, instead of the stored value. Signed-off-by: Hassan Abouelela <[email protected]>
| * | Adds Timestamp FieldGravatar Hassan Abouelela2020-12-17-1/+7
| |/ | | | | | | | | | | Adds timestamp field to user form responses on generation. Signed-off-by: Hassan Abouelela <[email protected]>
* / Make model changesGravatar Joe Banks2020-12-16-3/+19
|/
* minor refactoringsGravatar decorator-factory2020-12-15-2/+2
|
* fix various type annotation issuesGravatar decorator-factory2020-12-15-9/+9
|