tududi/backend/modules/notifications
Chris ea6d2b3ee8
fix(notifications): Add missing test notification endpoint (Issue #1002) (#1047)
The frontend test notification feature was calling /api/test-notifications/trigger,
but this endpoint didn't exist in the backend, causing a 404 HTML response that
failed JSON parsing with the error "JSON.parse: unexpected character at line 1 column 1".

Changes:
- Added triggerTestNotification service method to handle test notification creation
- Added triggerTestNotification controller method to handle the API request
- Registered POST /test-notifications/trigger route
- Implemented type mapping for all notification types (task_due_soon, task_overdue,
  defer_until, project_due_soon, project_overdue)
- Test notifications respect user notification preferences and send to enabled channels
- Returns notification details with sources (in-app, telegram) sent to

Fixes #1002
2026-04-18 17:51:27 +03:00
..
controller.js fix(notifications): Add missing test notification endpoint (Issue #1002) (#1047) 2026-04-18 17:51:27 +03:00
index.js Fix bug 366 (#764) 2026-01-07 18:18:07 +02:00
repository.js Fix bug 366 (#764) 2026-01-07 18:18:07 +02:00
routes.js fix(notifications): Add missing test notification endpoint (Issue #1002) (#1047) 2026-04-18 17:51:27 +03:00
service.js fix(notifications): Add missing test notification endpoint (Issue #1002) (#1047) 2026-04-18 17:51:27 +03:00