feat: change user_update api response, and add the basic and session auth to rest framework config file

This commit is contained in:
xoliqberdiyev
2026-04-02 17:07:56 +05:00
parent 9d8fd8e6de
commit 0dbd246120
2 changed files with 7 additions and 3 deletions

View File

@@ -183,8 +183,8 @@ class MeView(BaseViewSetMixin, GenericViewSet, UserService):
def user_update(self, request):
ser = self.get_serializer(instance=request.user, data=request.data, partial=True)
ser.is_valid(raise_exception=True)
ser.save()
return Response({"detail": _("Malumotlar yangilandi")})
data = ser.save()
return Response(UserSerializer(data).data)
@extend_schema(tags=["change-password"], description="Parolni o'zgartirish uchun")