diff options
author | 2020-10-07 09:42:28 +0530 | |
---|---|---|
committer | 2020-10-07 09:42:28 +0530 | |
commit | 5d3d305648acce800769c620760b3a642b399276 (patch) | |
tree | 46b6fe78e77d9f00bd7f07c741a945b15f2d5bb3 /pydis_site/apps/api/viewsets | |
parent | use more efficient code (diff) |
Document changes made to UserListSerializer in UserViewSet
Diffstat (limited to 'pydis_site/apps/api/viewsets')
-rw-r--r-- | pydis_site/apps/api/viewsets/bot/user.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pydis_site/apps/api/viewsets/bot/user.py b/pydis_site/apps/api/viewsets/bot/user.py index ebea6a45..54723890 100644 --- a/pydis_site/apps/api/viewsets/bot/user.py +++ b/pydis_site/apps/api/viewsets/bot/user.py @@ -104,6 +104,8 @@ class UserViewSet(ModelViewSet): ### POST /bot/users Adds a single or multiple new users. The roles attached to the user(s) must be roles known by the site. + User creation process will be skipped if user is already present in the database. + multiple users with the same id in the request data will raise an error. #### Request body >>> { @@ -120,6 +122,7 @@ class UserViewSet(ModelViewSet): #### Status codes - 201: returned on success - 400: if one of the given roles does not exist, or one of the given fields is invalid + - 400: if multiple user objects with the same id is given. ### PUT /bot/users/<snowflake:int> Update the user with the given `snowflake`. |