feat: add limit/pagination to notifications endpoint (#140) #150

Merged
cal merged 4 commits from issue/140-feat-add-limit-pagination-to-notifications-endpoin into main 2026-03-24 12:13:07 +00:00
Showing only changes of commit ac8ec4b283 - Show all commits

View File

@ -35,7 +35,7 @@ async def get_notifs(
limit: Optional[int] = 100,
):
if limit is not None:
limit = min(limit, 500)
limit = max(0, min(limit, 500))
all_notif = Notification.select().order_by(Notification.id)
if all_notif.count() == 0: