mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-07-16 02:16:16 +00:00
jira-15 dashboard api profile, default image, top leaderboard API
This commit is contained in:
@ -10,6 +10,7 @@ from account.utils import custom_response, custom_error_response
|
||||
# Create your views here.
|
||||
class UpdateJuniorProfile(viewsets.ViewSet):
|
||||
"""Update junior profile"""
|
||||
queryset = Junior.objects.all()
|
||||
serializer_class = CreateJuniorSerializer
|
||||
permission_classes = [IsAuthenticated]
|
||||
|
||||
@ -27,6 +28,7 @@ class UpdateJuniorProfile(viewsets.ViewSet):
|
||||
|
||||
class ValidateGuardianCode(viewsets.ViewSet):
|
||||
"""Check guardian code exist or not"""
|
||||
queryset = Guardian.objects.all()
|
||||
permission_classes = [IsAuthenticated]
|
||||
|
||||
def list(self, request, *args, **kwargs):
|
||||
@ -43,7 +45,7 @@ class JuniorListAPIView(viewsets.ModelViewSet):
|
||||
"""Junior list of assosicated guardian"""
|
||||
|
||||
serializer_class = JuniorDetailListSerializer
|
||||
|
||||
queryset = Junior.objects.all()
|
||||
def list(self, request, *args, **kwargs):
|
||||
""" junior list"""
|
||||
guardian_data = Guardian.objects.filter(user__email=request.user).last()
|
||||
|
Reference in New Issue
Block a user