feat(notifications): add PUT update endpoints for channels/templates/rules #293

Merged
David merged 2 commits from feat/PMS-386-notification-config-update-endpoints into main 2026-06-17 12:43:22 +02:00
Owner

Notification channels, templates, and rules could be created and deleted but never updated: routes registered only get/post/delete, so editing an existing config row meant delete + recreate, losing its id and any FK references (the dispatcher's rule.template_id, audit history). The UI's edit action had no endpoint to call.

Add PUT /notification-channels/{id}, /notification-templates/{id}, and /notification-rules/{id}. Each is full-replacement (PUT) semantics over the existing Upsert* request DTO, RequireAdmin-gated like the create path, tenant-scoped, and returns 404 when the row does not exist. The channel update re-encrypts config under the data key. Each mutation writes an AuditAction::Update row with before/after snapshots inside the same transaction, matching the create handlers.

#PMS-386

Notification channels, templates, and rules could be created and deleted but never updated: routes registered only get/post/delete, so editing an existing config row meant delete + recreate, losing its id and any FK references (the dispatcher's rule.template_id, audit history). The UI's edit action had no endpoint to call. Add PUT /notification-channels/{id}, /notification-templates/{id}, and /notification-rules/{id}. Each is full-replacement (PUT) semantics over the existing Upsert* request DTO, RequireAdmin-gated like the create path, tenant-scoped, and returns 404 when the row does not exist. The channel update re-encrypts config under the data key. Each mutation writes an AuditAction::Update row with before/after snapshots inside the same transaction, matching the create handlers. #PMS-386
feat(notifications): add PUT update endpoints for channels/templates/rules
All checks were successful
E2E / Playwright against staging (pull_request) Successful in 1m29s
Check / fmt + clippy + compile + unit/doc tests (pull_request) Successful in 3m35s
Integration / integration tests (pull_request) Successful in 9m7s
cad860a67c
Notification channels, templates, and rules could be created and deleted but never updated: routes registered only get/post/delete, so editing an existing config row meant delete + recreate, losing its id and any FK references (the dispatcher's rule.template_id, audit history). The UI's edit action had no endpoint to call.

Add PUT /notification-channels/{id}, /notification-templates/{id}, and /notification-rules/{id}. Each is full-replacement (PUT) semantics over the existing Upsert* request DTO, RequireAdmin-gated like the create path, tenant-scoped, and returns 404 when the row does not exist. The channel update re-encrypts config under the data key. Each mutation writes an AuditAction::Update row with before/after snapshots inside the same transaction, matching the create handlers.

#PMS-386
Merge branch 'main' into feat/PMS-386-notification-config-update-endpoints
All checks were successful
Create release / Create release from merged PR (pull_request) Has been skipped
E2E / Playwright against staging (pull_request) Successful in 1m19s
Check / fmt + clippy + compile + unit/doc tests (pull_request) Successful in 3m45s
Integration / integration tests (pull_request) Successful in 9m20s
f5756b218f
David merged commit d372b9b102 into main 2026-06-17 12:43:22 +02:00
David deleted branch feat/PMS-386-notification-config-update-endpoints 2026-06-17 12:43:22 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-server!293
No description provided.