aboutsummaryrefslogtreecommitdiffstats
path: root/backend
diff options
context:
space:
mode:
authorGravatar Jannes Jonkers <[email protected]>2021-01-20 18:11:28 +0100
committerGravatar Jannes Jonkers <[email protected]>2021-01-20 18:11:28 +0100
commitb76505a9e28cbadf1590b80694ada496d448a591 (patch)
tree924f9ee837446e4b4116857962abe2b237e1d266 /backend
parentMerge 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 'backend')
-rw-r--r--backend/models/form.py3
1 files changed, 2 insertions, 1 deletions
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: