Skip to content

Commit

Permalink
Docs: Add User Management tag to swagger schema
Browse files Browse the repository at this point in the history
  • Loading branch information
SverreNystad committed Jan 4, 2024
1 parent f819fd5 commit 7f952cb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion backend/users/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
method="post",
request_body=LoginSerializer,
operation_description="Login to the application",
tags=["User Management"],
)
@api_view(["POST"])
def LoginView(request):
Expand All @@ -36,7 +37,12 @@ def LoginView(request):
)


@swagger_auto_schema(method="post", request_body=RegisterSerializer)
@swagger_auto_schema(
method="post",
request_body=RegisterSerializer,
operation_description="Register a new user to the application. This will create a new user in the database.",
tags=["User Management"],
)
@api_view(["POST"])
def RegisterUser(request):
serializer = RegisterSerializer(data=request.data)
Expand Down

0 comments on commit 7f952cb

Please sign in to comment.