Convert username to lower case
This commit is contained in:
parent
4ef256abb3
commit
d09f670a77
|
@ -54,7 +54,7 @@ class UserViewSet(viewsets.ReadOnlyModelViewSet):
|
||||||
|
|
||||||
@api_view(["POST"])
|
@api_view(["POST"])
|
||||||
def login(request):
|
def login(request):
|
||||||
username = request.data.get("username")
|
username = request.data.get("username").lower()
|
||||||
password = request.data.get("password")
|
password = request.data.get("password")
|
||||||
if username is None or password is None:
|
if username is None or password is None:
|
||||||
return Response({'error': 'Please provide both username and password'},
|
return Response({'error': 'Please provide both username and password'},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user