Fixes: UserViewSet.upload_avatar
This commit is contained in:
parent
d2fb042c99
commit
d0362fe02f
1 changed files with 1 additions and 1 deletions
|
|
@ -53,7 +53,7 @@ class UserViewSet(
|
||||||
|
|
||||||
@action(detail=True, methods=["put"], permission_classes=[IsAuthenticated])
|
@action(detail=True, methods=["put"], permission_classes=[IsAuthenticated])
|
||||||
@method_decorator(ratelimit(key="ip", rate="2/h" if not DEBUG else "888/h"))
|
@method_decorator(ratelimit(key="ip", rate="2/h" if not DEBUG else "888/h"))
|
||||||
def upload_avatar(self, request):
|
def upload_avatar(self, request, **kwargs):
|
||||||
user = self.get_object()
|
user = self.get_object()
|
||||||
if request.user != user:
|
if request.user != user:
|
||||||
return Response(status=status.HTTP_403_FORBIDDEN)
|
return Response(status=status.HTTP_403_FORBIDDEN)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue