Skip to content

Commit

Permalink
Update views.py
Browse files Browse the repository at this point in the history
  • Loading branch information
hakanaktas0 committed Nov 25, 2023
1 parent 6cfbfda commit 15e1ade
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions project/backend/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,11 @@ class BasicUserDetailAPI(APIView):

def get(self, request, *args, **kwargs):
user = BasicUser.objects.get(user_id=request.user.id)
serializer = BasicUserSerializer(user)

return Response(serializer.data)
return JsonResponse({'basic_user_id':user.id,
'bio':user.bio,
'email_notification_preference': user.email_notification_preference,
'show_activity_preference':user.show_activity_preference},status=200)


class ChangePasswordView(generics.UpdateAPIView):
Expand Down

0 comments on commit 15e1ade

Please sign in to comment.