diff --git a/apps/bookmark/models/bookmark.py b/apps/bookmark/models/bookmark.py index 4c79881..0758466 100644 --- a/apps/bookmark/models/bookmark.py +++ b/apps/bookmark/models/bookmark.py @@ -76,8 +76,8 @@ class Bookmark(models.Model): from apps.podcast.models import PodcastPlaylist return PodcastPlaylist.objects.filter(id=content_id).exists() elif service == cls.ServiceChoices.HADITH: - from apps.hadith.models import Hadith - return Hadith.objects.filter(id=content_id).exists() + from apps.hadis.models import Hadis + return Hadis.objects.filter(id=content_id).exists() elif service == cls.ServiceChoices.VIDEO: from apps.video.models import Video return Video.objects.filter(id=content_id).exists() diff --git a/apps/bookmark/views/bookmark.py b/apps/bookmark/views/bookmark.py index 8181f23..05f3210 100644 --- a/apps/bookmark/views/bookmark.py +++ b/apps/bookmark/views/bookmark.py @@ -22,7 +22,10 @@ class AddBookmarkView(CreateAPIView): serializer_class = BookmarkSerializer @swagger_auto_schema( - operation_description="Add a bookmark for a specific content in a service. If the bookmark already exists but is inactive, it will be reactivated.", + operation_description="Add a bookmark for a specific content in a service.\ + If the bookmark already exists but is inactive, it will be reactivated.\ + \n Services must be choose from : \n \ + 'Library'\n'Podcast'\n'Podcast Playlist'\n'Hadith'\n'Video'\n'Video Playlist'\n'Article'", tags=["Dobodbi - Bookmarks"], request_body=BookmarkSerializer, responses={ @@ -31,7 +34,7 @@ class AddBookmarkView(CreateAPIView): 400: "Invalid input." } ) - def post(self, request, pk, *args, **kwargs): + def post(self, request, *args, **kwargs): return super().post(request,*args, **kwargs) def create(self, request, *args, **kwargs): service = request.data.get('service')