diff --git a/app/today/serializers.py b/app/today/serializers.py index 956f096..630f0ed 100644 --- a/app/today/serializers.py +++ b/app/today/serializers.py @@ -27,6 +27,6 @@ class Meta: "translated_sentence", "title", "description", - "upload_date", + "upload_time", "thumbnail_url", ] diff --git a/app/today/views.py b/app/today/views.py index b73cb48..40d10d4 100644 --- a/app/today/views.py +++ b/app/today/views.py @@ -19,7 +19,7 @@ class VideoDetailsViewSet(viewsets.ModelViewSet): @action(detail=False, methods=["get"], url_path="latest") def latest_video(self, request): - recent_video = self.get_queryset().order_by("-upload_date").first() + recent_video = self.get_queryset().order_by("-upload_time").first() if recent_video is not None: serializer = self.get_serializer(recent_video) return Response(serializer.data) diff --git a/frontend/src/components/LatestVideo.vue b/frontend/src/components/LatestVideo.vue index 99a0085..a8919f4 100644 --- a/frontend/src/components/LatestVideo.vue +++ b/frontend/src/components/LatestVideo.vue @@ -2,7 +2,7 @@

Spanish Word of the Day

-

{{ video.upload_date }}

+

{{ video.upload_time }}

@@ -56,7 +56,7 @@ const video = reactive({ word: "", sentence: "", translated_sentence: "", - upload_date: "", + upload_time: "", }); const flipped = ref(false); @@ -76,7 +76,7 @@ async function fetchVideos() { video.word = response.data.word || ""; video.sentence = response.data.sentence || ""; video.translated_sentence = response.data.translated_sentence || ""; - video.upload_date = formatDate(new Date(response.data.upload_date)) || ""; + video.upload_time = formatDate(new Date(response.data.upload_time)) || ""; } else { console.error("Error: No data received from API."); }