clean code
This commit is contained in:
parent
c9f2d0a054
commit
cfaa728e55
2 changed files with 1 additions and 14 deletions
|
|
@ -23,18 +23,6 @@ def video_list(request):
|
|||
serializer = VideoSerializer(videos, many=True)
|
||||
return Response(serializer.data)
|
||||
|
||||
@api_view(['GET'])
|
||||
@permission_classes([IsAuthenticated])
|
||||
def check_thumbnail_status(request, video_id):
|
||||
"""
|
||||
Check the status of the thumbnail creation for a specific video.
|
||||
"""
|
||||
try:
|
||||
video = Video.objects.get(id=video_id)
|
||||
return Response({'thumbnail_created': video.thumbnail_created})
|
||||
except Video.DoesNotExist:
|
||||
return Response({'error': 'Video not found'}, status=404)
|
||||
|
||||
@api_view(['POST'])
|
||||
@permission_classes([IsAuthenticated])
|
||||
def video_upload(request):
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ urlpatterns = [
|
|||
# Content URLs
|
||||
path('content/', content_views.video_list),
|
||||
path('content/upload/', content_views.video_upload),
|
||||
path('content/<int:video_id>/status/', content_views.check_thumbnail_status),
|
||||
|
||||
# Users URLs
|
||||
path('users/', user_views.user_list),
|
||||
|
|
|
|||
Loading…
Reference in a new issue