Skip to content

Commit

Permalink
bugfix admins #88
Browse files Browse the repository at this point in the history
  • Loading branch information
DeLany123 committed Mar 11, 2024
1 parent 47353a4 commit a2263a4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
.tool-versions
.idea
.venv
.vscode
/node_modules
2 changes: 1 addition & 1 deletion backend/api/views/admin_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def create(self, request):
serializer = UserIDSerializer(data=request.data)

if serializer.is_valid(raise_exception=True):
user = User.objects.get(serializer.validated_data["user_id"])
user = serializer.validated_data["user_id"]
user.make_admin()

return Response({
Expand Down

0 comments on commit a2263a4

Please sign in to comment.