mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2025-04-20 08:42:01 +03:00
Merge 76fd218958
into cdd04aa9be
This commit is contained in:
commit
7589bff351
|
@ -115,13 +115,10 @@ class LogoutView(APIView):
|
|||
"""
|
||||
permission_classes = (AllowAny,)
|
||||
|
||||
def get(self, request, *args, **kwargs):
|
||||
if getattr(settings, 'ACCOUNT_LOGOUT_ON_GET', False):
|
||||
if getattr(settings, 'ACCOUNT_LOGOUT_ON_GET', False):
|
||||
def get(self, request, *args, **kwargs):
|
||||
response = self.logout(request)
|
||||
else:
|
||||
response = self.http_method_not_allowed(request, *args, **kwargs)
|
||||
|
||||
return self.finalize_response(request, response, *args, **kwargs)
|
||||
return self.finalize_response(request, response, *args, **kwargs)
|
||||
|
||||
def post(self, request, *args, **kwargs):
|
||||
return self.logout(request)
|
||||
|
|
Loading…
Reference in New Issue
Block a user