Files
vikunja/pkg/db/fixtures/notifications.yml
T
kolaenteandkolaente 1ca5367f27 feat(api/v2): add notifications list/mark-read + mark-all on /api/v2
Ports the v1 DatabaseNotifications routes to the Huma /api/v2 API:
- GET /notifications lists the caller's own notifications (paginated)
- PUT /notifications/{notificationid} marks one (un-)read
- POST /notifications is a custom action marking all as read; the
  link-share guard, session and commit live in the handler since there
  is no CRUDable Do* for a bulk mark.

Adds fixture rows and a webtest matrix mirroring the v1 model behaviour
(own-only visibility, mark-(un)read, link-share refusal on every route).
2026-06-07 10:05:24 +00:00

22 lines
480 B
YAML

- id: 1
notifiable_id: 1
notification: '{"test":"notification one"}'
name: test.notification
subject_id: 1
read_at: null
created: 2022-01-01 00:00:00
- id: 2
notifiable_id: 1
notification: '{"test":"notification two"}'
name: test.notification
subject_id: 2
read_at: null
created: 2022-01-02 00:00:00
- id: 3
notifiable_id: 2
notification: '{"test":"other user"}'
name: test.notification
subject_id: 3
read_at: null
created: 2022-01-03 00:00:00