diff options
author | 2022-03-10 17:28:39 +0100 | |
---|---|---|
committer | 2022-03-10 17:28:39 +0100 | |
commit | 8c95f13c96d16d6f4d0736ee136563d603926c63 (patch) | |
tree | 6e6404a9b89b3ead932fce83da418f453c7ec98e /pydis_site | |
parent | Patch AoC tables to use the Discord user as PK. (diff) |
Enhance code, documentation consistency in AoC related code
Co-authored-by: Mark <[email protected]>
Diffstat (limited to 'pydis_site')
-rw-r--r-- | pydis_site/apps/api/viewsets/bot/aoc_completionist_block.py | 7 | ||||
-rw-r--r-- | pydis_site/apps/api/viewsets/bot/aoc_link.py | 1 |
2 files changed, 5 insertions, 3 deletions
diff --git a/pydis_site/apps/api/viewsets/bot/aoc_completionist_block.py b/pydis_site/apps/api/viewsets/bot/aoc_completionist_block.py index 8e7d821c..d3167d7b 100644 --- a/pydis_site/apps/api/viewsets/bot/aoc_completionist_block.py +++ b/pydis_site/apps/api/viewsets/bot/aoc_completionist_block.py @@ -23,7 +23,7 @@ class AocCompletionistBlockViewSet( >>> [ ... { ... "user": 2, - ... "is_blocked": False + ... "is_blocked": False, ... "reason": "Too good to be true" ... } ... ] @@ -36,7 +36,7 @@ class AocCompletionistBlockViewSet( >>> ... { ... "user": 2, - ... "is_blocked": False + ... "is_blocked": False, ... "reason": "Too good to be true" ... } @@ -50,7 +50,7 @@ class AocCompletionistBlockViewSet( #### Request body >>> { ... "user": int, - ... "is_blocked": bool + ... "is_blocked": bool, ... "reason": string ... } @@ -60,6 +60,7 @@ class AocCompletionistBlockViewSet( ### DELETE /bot/aoc-completionist-blocks/<user__id:int> Deletes the AoC Completionist block item with the given `user__id`. + #### Status codes - 204: returned on success - 404: if the AoC Completionist block with the given user__id does not exist diff --git a/pydis_site/apps/api/viewsets/bot/aoc_link.py b/pydis_site/apps/api/viewsets/bot/aoc_link.py index c3fa6854..5f6f3a84 100644 --- a/pydis_site/apps/api/viewsets/bot/aoc_link.py +++ b/pydis_site/apps/api/viewsets/bot/aoc_link.py @@ -59,6 +59,7 @@ class AocAccountLinkViewSet( ### DELETE /bot/aoc-account-links/<user__id:int> Deletes the AoC account link item with the given `user__id`. + #### Status codes - 204: returned on success - 404: if the AoC account link with the given user__id does not exist |