[Update] 删掉token api调用次数限制

pull/1068/head
ibuler 2018-03-12 20:29:27 +08:00
parent 8e4ab9f3a9
commit faf6a7b623
1 changed files with 1 additions and 2 deletions

View File

@ -180,7 +180,7 @@ class UserConnectionTokenApi(APIView):
'asset': asset_id,
'system_user': system_user_id
}
cache.set(token, value, timeout=60)
cache.set(token, value, timeout=20)
return Response({"token": token}, status=201)
def get(self, request):
@ -192,7 +192,6 @@ class UserConnectionTokenApi(APIView):
return Response('', status=404)
if not user_only:
cache.delete(token)
return Response(value)
else:
return Response({'user': value['user']})