From 14f09a2dfb7be592e585f6493438a04cba163d10 Mon Sep 17 00:00:00 2001 From: Michiel Scholten Date: Thu, 11 Dec 2025 17:45:25 +0100 Subject: [PATCH] Small fixes --- src/digimarks/bookmarks_service.py | 5 ++++- src/digimarks/main.py | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) 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)