add: profile avatar

This commit is contained in:
2023-12-06 15:19:41 +01:00
parent 910644a804
commit 9b6c5547f0
16 changed files with 141 additions and 37 deletions

View File

@ -13,4 +13,6 @@ class LoggedView(APIView):
authentication_classes = (SessionAuthentication,)
def get(self, request: HttpRequest):
return Response(str(request.user.is_authenticated), status=status.HTTP_200_OK)
if (request.user.is_authenticated):
return Response({'id': request.user.pk}, status=status.HTTP_200_OK)
return Response('false', status=status.HTTP_200_OK)