Skip to content

Commit

Permalink
Merge pull request #42 from GTZ-STUDIO/master
Browse files Browse the repository at this point in the history
Pull changes from master to develop
  • Loading branch information
Verzaccii committed Feb 24, 2024
2 parents a8b322c + 92f706f commit 5e346cf
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lvlgg_backend/account/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def post(self, request):
create unsuccessful
200 - successful created a user
"""
data = json.loads(request.body.decode("utf-8"))
data = request.data
username = data.get("username")
password = data.get("password")
firstname = data.get("firstname")
Expand Down Expand Up @@ -135,14 +135,11 @@ def post(self, request):
200: successful
401: Unauthorize, invalid username or password
"""
print(request.data)

data = request.data
username = data.get("username")
password = data.get("password")

print(username)
print(password)

# username and password are madatory
if not username or not password:
return Response(status=400, data={"Error": "Missing username or password"})
Expand Down

0 comments on commit 5e346cf

Please sign in to comment.