mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-27 03:54:02 +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)
|
||||
return self.queryset.filter(id=self.request.user.id)
|
||||
|
||||
@action(detail=False, methods=["GET"])
|
||||
@action(detail=False)
|
||||
def me(self, request):
|
||||
serializer = UserSerializer(request.user, context={"request": request})
|
||||
return Response(status=status.HTTP_200_OK, data=serializer.data)
|
||||
|
|
Loading…
Reference in New Issue
Block a user