mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-07-19 08:13:10 -05:00
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).
22 lines
480 B
YAML
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
|