Skip to content

Commit

Permalink
fix thumbnail as read only in API
Browse files Browse the repository at this point in the history
  • Loading branch information
submarcos committed Jul 12, 2024
1 parent b691559 commit a5f9df3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions backend/project/api/views.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from django_filters.rest_framework import DjangoFilterBackend
from drf_spectacular.utils import extend_schema
from rest_framework import permissions, status, viewsets
from rest_framework.decorators import action
from rest_framework.generics import GenericAPIView, get_object_or_404
Expand Down Expand Up @@ -99,7 +98,6 @@ def get_queryset(self):
def perform_create(self, serializer):
serializer.save(observer=self.request.user)

@extend_schema(request=MediaSerializer, responses={204: None}, methods=["POST"])
@action(
detail=True,
methods=["post"],
Expand All @@ -116,6 +114,7 @@ def add_media(self, request, *args, **kwargs):

@action(
detail=True,
serializer_class=MediaSerializer,
methods=["delete", "patch"],
url_path=r"medias/(?P<uuid_media>[^/.]+)",
)
Expand Down

0 comments on commit a5f9df3

Please sign in to comment.