use modeliga avatar fieldni qoshildi

This commit is contained in:
Husanjonazamov
2026-03-17 18:25:20 +05:00
parent 397f239b1d
commit 0d574a92a9
5 changed files with 39 additions and 3 deletions

View File

@@ -6,7 +6,7 @@ from django.contrib.auth import get_user_model
from django.utils.translation import gettext_lazy as _
from django_core import exceptions
from drf_spectacular.utils import extend_schema
from rest_framework import status, throttling, request
from rest_framework import status, throttling, request, parsers
from rest_framework.response import Response
from rest_framework.exceptions import PermissionDenied
from rest_framework.viewsets import GenericViewSet
@@ -160,6 +160,11 @@ class ResetPasswordView(BaseViewSetMixin, GenericViewSet, UserService):
@extend_schema(tags=["me"])
class MeView(BaseViewSetMixin, GenericViewSet, UserService):
permission_classes = [IsAuthenticated]
parser_classes = (
parsers.MultiPartParser,
parsers.FormParser,
parsers.JSONParser,
)
def get_serializer_class(self):
match self.action: