aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/api/viewsets
diff options
context:
space:
mode:
authorGravatar Leon Sandøy <[email protected]>2020-07-19 11:55:20 +0200
committerGravatar Leon Sandøy <[email protected]>2020-07-19 11:55:20 +0200
commit8874a83fa6372e0ce46e9552e8c21c182e4a1c3e (patch)
treee60ae36f91180ef74cc2d1fbba0d985ff8a86d48 /pydis_site/apps/api/viewsets
parentAdd an endpoint for getting AllowDenyList types. (diff)
Add another AllowDenyList field, 'comment'.
This will be used to describe or justify the entries in the blacklist or whitelist, for example for the guild name in the case of guild invite IDs, so that we have some context when we're displaying the list. https://github.com/python-discord/site/issues/305
Diffstat (limited to 'pydis_site/apps/api/viewsets')
-rw-r--r--pydis_site/apps/api/viewsets/bot/allow_deny_list.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/pydis_site/apps/api/viewsets/bot/allow_deny_list.py b/pydis_site/apps/api/viewsets/bot/allow_deny_list.py
index 2b9fd6a7..72cbc84c 100644
--- a/pydis_site/apps/api/viewsets/bot/allow_deny_list.py
+++ b/pydis_site/apps/api/viewsets/bot/allow_deny_list.py
@@ -24,6 +24,7 @@ class AllowDenyListViewSet(ModelViewSet):
... 'type': "file_format",
... 'allowed': 'true',
... 'content': ".jpeg",
+ ... 'comment': "Popular image format.",
... },
... ...
... ]
@@ -43,6 +44,7 @@ class AllowDenyListViewSet(ModelViewSet):
... 'type': "file_format",
... 'allowed': 'true',
... 'content': ".jpeg",
+ ... 'comment': "Popular image format.",
... }
#### Status codes
@@ -57,6 +59,7 @@ class AllowDenyListViewSet(ModelViewSet):
... 'type': str,
... 'allowed': bool,
... 'content': str,
+ ... 'comment': Optional[str],
... }
#### Status codes