mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-23 10:04:01 +03:00
Merge pull request #3385 from danihodovic/refactor/remove-user-api-methods
refactor: remove user API methods parameter
This commit is contained in:
commit
5e906a6636
|
@ -19,7 +19,7 @@ class UserViewSet(RetrieveModelMixin, ListModelMixin, UpdateModelMixin, GenericV
|
||||||
assert isinstance(self.request.user.id, int)
|
assert isinstance(self.request.user.id, int)
|
||||||
return self.queryset.filter(id=self.request.user.id)
|
return self.queryset.filter(id=self.request.user.id)
|
||||||
|
|
||||||
@action(detail=False, methods=["GET"])
|
@action(detail=False)
|
||||||
def me(self, request):
|
def me(self, request):
|
||||||
serializer = UserSerializer(request.user, context={"request": request})
|
serializer = UserSerializer(request.user, context={"request": request})
|
||||||
return Response(status=status.HTTP_200_OK, data=serializer.data)
|
return Response(status=status.HTTP_200_OK, data=serializer.data)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user