chore [P-0]: сhore
This commit is contained in:
1 parent
d13d02fadb
commit
2e48e08b83
389 files changed
+17779
-11492
No files matched your search
Regular → Executable
+10
-13
@@ -1,17 +1,19 @@
|
||||
from rest_framework.permissions import AllowAny, IsAuthenticated
|
||||
from rest_framework.permissions import AllowAny
|
||||
from rest_framework.response import Response
|
||||
from rest_framework.views import APIView
|
||||
from userauth.models import *
|
||||
|
||||
from navigation.models import *
|
||||
from navigation.serializers import *
|
||||
from userauth.models import *
|
||||
from userauth.serializers import *
|
||||
|
||||
from .models import *
|
||||
from .serializers import *
|
||||
|
||||
|
||||
class getuserAPIView(APIView):
|
||||
permission_classes = (AllowAny,)
|
||||
|
||||
|
||||
def get(self, request):
|
||||
"""
|
||||
Параметр: userlogin
|
||||
@@ -19,19 +21,14 @@ class getuserAPIView(APIView):
|
||||
Результат: Выдает все данные о пользователе
|
||||
Если дать дополнительный параметр fullinfo = True, то будет выдаваться информация с комиссиями и ответсвенностью
|
||||
"""
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
resp = None
|
||||
fullinfo = request.query_params.get('fullinfo')
|
||||
queryset = DictEmployee.objects.get(login=request.query_params.get('userlogin'))
|
||||
if(fullinfo is None or fullinfo == False ):
|
||||
fullinfo = request.query_params.get("fullinfo")
|
||||
queryset = DictEmployee.objects.get(login=request.query_params.get("userlogin"))
|
||||
if fullinfo is None or fullinfo == False:
|
||||
resp = InfoUserCardSerializer(queryset).data
|
||||
|
||||
else:
|
||||
resp = CardUserSerializer(queryset).data
|
||||
|
||||
return Response(resp)
|
||||
|
||||
|
||||
return Response(resp)
|
||||
Reference in new issue
Block a user