Class NotificationController

java.lang.Object
su.onno.ui.notifications.NotificationController

@RestController @RequestMapping("/api/notifications") public class NotificationController extends Object
The per-user notification endpoint. Every read and mutation is scoped to the caller: the recipient is resolved from the authenticated principal via CurrentUserResolver (identity record id, or username for an unlinked login) and used as the _recipient filter, so a user only ever sees or marks their own notifications — the client never asserts whose feed it is.
  • GET /api/notifications — one newest-first timeline window {items, nextCursor, hasMore, unreadCount}; ?unread=true restricts to unread, ?cursor= resumes.
  • POST /api/notifications/{id}/read — mark one read.
  • POST /api/notifications/read-all — mark every unread one read.

A guest (no resolvable identity) gets an empty feed and its mutations are no-ops.