mirror of
https://git.vectorsigma.ru/public/tubearchivist.git
synced 2026-08-04 22:39:38 +00:00
return token #718
This commit is contained in:
@@ -244,6 +244,11 @@ class TokenView(ApiBaseView):
|
||||
|
||||
permission_classes = [AdminOnly]
|
||||
|
||||
@staticmethod
|
||||
def get(request):
|
||||
"""get token"""
|
||||
return Response({"token": str(request.user.auth_token)})
|
||||
|
||||
@staticmethod
|
||||
def delete(request):
|
||||
"""delete the token, new will get created automatically"""
|
||||
|
||||
Reference in New Issue
Block a user