mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2024-11-22 09:06:40 +03:00
Handle extra args and kwargs in all POST endpoints
This fixes compatibility with DRF's versioning
This commit is contained in:
parent
42d039b473
commit
b34250ec94
|
@ -113,7 +113,7 @@ class LogoutView(APIView):
|
||||||
|
|
||||||
return self.finalize_response(request, response, *args, **kwargs)
|
return self.finalize_response(request, response, *args, **kwargs)
|
||||||
|
|
||||||
def post(self, request):
|
def post(self, request, *args, **kwargs):
|
||||||
return self.logout(request)
|
return self.logout(request)
|
||||||
|
|
||||||
def logout(self, request):
|
def logout(self, request):
|
||||||
|
@ -193,7 +193,7 @@ class PasswordResetConfirmView(GenericAPIView):
|
||||||
def dispatch(self, *args, **kwargs):
|
def dispatch(self, *args, **kwargs):
|
||||||
return super(PasswordResetConfirmView, self).dispatch(*args, **kwargs)
|
return super(PasswordResetConfirmView, self).dispatch(*args, **kwargs)
|
||||||
|
|
||||||
def post(self, request):
|
def post(self, request, *args, **kwargs):
|
||||||
serializer = self.get_serializer(data=request.data)
|
serializer = self.get_serializer(data=request.data)
|
||||||
serializer.is_valid(raise_exception=True)
|
serializer.is_valid(raise_exception=True)
|
||||||
serializer.save()
|
serializer.save()
|
||||||
|
@ -216,7 +216,7 @@ class PasswordChangeView(GenericAPIView):
|
||||||
def dispatch(self, *args, **kwargs):
|
def dispatch(self, *args, **kwargs):
|
||||||
return super(PasswordChangeView, self).dispatch(*args, **kwargs)
|
return super(PasswordChangeView, self).dispatch(*args, **kwargs)
|
||||||
|
|
||||||
def post(self, request):
|
def post(self, request, *args, **kwargs):
|
||||||
serializer = self.get_serializer(data=request.data)
|
serializer = self.get_serializer(data=request.data)
|
||||||
serializer.is_valid(raise_exception=True)
|
serializer.is_valid(raise_exception=True)
|
||||||
serializer.save()
|
serializer.save()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user