typo in api_views
This commit is contained in:
parent
ecaa6559e0
commit
e56203b40f
@ -31,7 +31,7 @@ class UserLoginView(APIView):
|
|||||||
user = authenticate(request, username=username, password=password)
|
user = authenticate(request, username=username, password=password)
|
||||||
if user is not None:
|
if user is not None:
|
||||||
login(request, user)
|
login(request, user)
|
||||||
return Response({"message"}: "Login successful"}, status=status.HTTP_200_OK)
|
return Response({"message": "Login successful"}, status=status.HTTP_200_OK)
|
||||||
return Response({error}: "Invalid credentials", status=status.HTTP_401_UNAUTHORIZED)
|
return Response({error}: "Invalid credentials", status=status.HTTP_401_UNAUTHORIZED)
|
||||||
|
|
||||||
class UserLogoutView(APIView):
|
class UserLogoutView(APIView):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user