diff options
| author | 2021-01-20 18:11:28 +0100 | |
|---|---|---|
| committer | 2021-01-20 18:11:28 +0100 | |
| commit | b76505a9e28cbadf1590b80694ada496d448a591 (patch) | |
| tree | 924f9ee837446e4b4116857962abe2b237e1d266 | |
| parent | Merge pull request #53 from python-discord/dependabot/pip/pyjwt-2.0.1 (diff) | |
Add an optional response field to forms to customize the response upon submitting.
Diffstat (limited to '')
| -rw-r--r-- | SCHEMA.md | 1 | ||||
| -rw-r--r-- | backend/models/form.py | 3 | 
2 files changed, 3 insertions, 1 deletions
| @@ -20,6 +20,7 @@ In this document:  | `name`        | String                                    | Name of the form                                                                          | `"Summer Code Jam 2100"`                 |  | `description` | String                                    | Form description                                                                          | `"This is my amazing form description."` |  | `webhook`     | [Webhook object](#webhooks)               | An optional discord webhook.                                                              | See webhook documentation.               | +| `response`    | Optional[String]                          | An optional string for the response upon submitting.                                      | `"This is my amazing form response."`    |  ### Form features diff --git a/backend/models/form.py b/backend/models/form.py index 57372ea..bc29cfa 100644 --- a/backend/models/form.py +++ b/backend/models/form.py @@ -7,7 +7,7 @@ from pydantic.error_wrappers import ErrorWrapper, ValidationError  from backend.constants import FormFeatures, WebHook  from .question import Question -PUBLIC_FIELDS = ["id", "features", "questions", "name", "description"] +PUBLIC_FIELDS = ["id", "features", "questions", "name", "description", "response"]  class _WebHook(BaseModel): @@ -32,6 +32,7 @@ class Form(BaseModel):      questions: list[Question]      name: str      description: str +    response: t.Optional[str] = None      webhook: _WebHook = None      class Config: | 
