diff --git a/src/digimarks/bookmarks_service.py b/src/digimarks/bookmarks_service.py index 1752efb..0906360 100644 --- a/src/digimarks/bookmarks_service.py +++ b/src/digimarks/bookmarks_service.py @@ -92,7 +92,10 @@ async def list_bookmarks_for_user( offset: int = 0, limit: Annotated[int, Query(le=10000)] = 100, ) -> Sequence[Bookmark]: - """List all bookmarks in the database. By default, 100 items are returned.""" + """List all bookmarks in the database. By default, 100 items are returned. + + There is a limit of 10000 items. + """ result = await session.exec( select(Bookmark) .where(Bookmark.user_key == user_key, Bookmark.status != Visibility.DELETED) diff --git a/src/digimarks/main.py b/src/digimarks/main.py index d53f757..5a6af45 100644 --- a/src/digimarks/main.py +++ b/src/digimarks/main.py @@ -202,7 +202,7 @@ async def autocomplete_bookmark( user_key: str, bookmark: Bookmark, strip_params: bool = False, -): +) -> Bookmark: """Autofill some fields for this (new) bookmark for user `user_key`.""" logger.info('Autocompleting bookmark %s for user %s', bookmark.url_hash, user_key) return await bookmarks_service.autocomplete_bookmark(session, request, user_key, bookmark, strip_params) @@ -248,7 +248,7 @@ async def delete_bookmark( """(Soft)Delete bookmark `bookmark_key` for user `user_key`.""" logger.info('Deleting bookmark %s for user %s', url_hash, user_key) try: - result = await bookmarks_service.delete_bookmark(session, user_key, url_hash) + _ = await bookmarks_service.delete_bookmark(session, user_key, url_hash) return {'ok': True} except Exception: logger.exception('Failed to delete bookmark %s', url_hash)