mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2024-11-22 00:56:34 +03:00
passing on the context/request to serializer
This commit is contained in:
parent
49ccfe92a9
commit
22667230bb
|
@ -63,9 +63,9 @@ class LoginView(GenericAPIView):
|
|||
'user': self.user,
|
||||
'token': self.token
|
||||
}
|
||||
serializer = serializer_class(instance=data)
|
||||
serializer = serializer_class(instance=data, context={'request': self.request})
|
||||
else:
|
||||
serializer = serializer_class(instance=self.token)
|
||||
serializer = serializer_class(instance=self.token, context={'request': self.request})
|
||||
|
||||
return Response(serializer.data, status=status.HTTP_200_OK)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user