Skip to content
This repository was archived by the owner on Aug 29, 2023. It is now read-only.

Commit 865ab09

Browse files
Added the zolovideos api to work with the data
1 parent 53b4497 commit 865ab09

File tree

4 files changed

+3
-10
lines changed

4 files changed

+3
-10
lines changed
81 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

rewards/urls.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
path('addQuizApi', views.AddQuizInApi.as_view()),
2020
path('quizTurns', views.QuizInTurns.as_view()),
2121
path("automatequiz", views.load_questions_from_json_view, name="nothing"),
22-
# path("getZoloVideos", views.GetZoloVideos.as_view()),
23-
# path("ZoloVideoApi", views.ZoloVideoApi.as_view())
22+
path("getZoloVideos", views.GetZoloVideos.as_view()),
23+
path("ZoloVideoApi", views.ZoloVideoApi.as_view())
2424
]
2525

2626

rewards/views.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from django.utils import timezone as django_timezone
1414
from .serializers import QuestionSerializer, QuizApiSerializer, QuizSerializer, MonsterHunterSerializer
1515
from .models import Subject, Quiz, Questions
16+
1617
User = get_user_model()
1718

1819

@@ -431,19 +432,11 @@ def get(self, request):
431432
# Retrieve ZoloVideos instance for the current user
432433
zolo_videos = ZoloVideos.objects.get(user=request.user)
433434

434-
435435
# Get the unwatched video URLs based on the user's country
436436
unwatched_urls = zolo_videos.get_videos_by_country()
437437
return Response({"urls": unwatched_urls}, status=status.HTTP_200_OK)
438438

439439

440-
441-
442-
443-
444-
445-
446-
447440
class ZoloVideoApi(APIView):
448441
authentication_classes = [TokenAuthentication]
449442

0 commit comments

Comments
 (0)