From c402bc0ed0ac56048f1a737f64fba039c6087797 Mon Sep 17 00:00:00 2001 From: mortezaei Date: Wed, 7 May 2025 11:57:20 +0330 Subject: [PATCH] fix: bookmark --- apps/bookmark/views/bookmark.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/bookmark/views/bookmark.py b/apps/bookmark/views/bookmark.py index 837f575..1a0da3e 100644 --- a/apps/bookmark/views/bookmark.py +++ b/apps/bookmark/views/bookmark.py @@ -5,6 +5,7 @@ from rest_framework.permissions import IsAuthenticated from rest_framework.generics import CreateAPIView, DestroyAPIView from rest_framework.exceptions import ValidationError from drf_yasg.utils import swagger_auto_schema +from drf_yasg import openapi from apps.bookmark.models import Bookmark from apps.bookmark.serializers import BookmarkSerializer @@ -79,7 +80,14 @@ class RemoveBookmarkView(DestroyAPIView): @swagger_auto_schema( operation_description="Deactivate a bookmark by setting its status to False using content_id and user.", - request_body=BookmarkSerializer, + request_body=openapi.Schema( + type=openapi.TYPE_OBJECT, + properties={ + 'service': openapi.Schema(type=openapi.TYPE_STRING, description='The service associated with the bookmark.'), + 'content_id': openapi.Schema(type=openapi.TYPE_STRING, description='The ID of the content to deactivate the bookmark for.') + }, + required=['service', 'content_id'] + ), responses={ 204: "Bookmark deactivated successfully.", 400: "Invalid input.",