feat(admin-console): Stage 6 — mail & notifications domain
Add the mail, notifications, and broadcast pages over the mail, notification,
and diplomail services (no new business logic), completing the operator console.
- GET /_gm/mail deliveries (paginated) + dead-letters
- GET /_gm/mail/deliveries/{id} delivery detail + attempts
- POST /_gm/mail/deliveries/{id}/resend re-enqueue a non-sent delivery
- GET /_gm/notifications notifications + dead-letters + malformed
- GET/POST /_gm/broadcast multi-game admin diplomatic broadcast
Console depends on MailAdmin / NotificationAdmin / DiplomailAdmin interfaces
(satisfied by the concrete services); pages render in tests without a database.
Delivery detail and dead-letters live under /_gm/mail/deliveries/* and
/_gm/mail/... static segments to avoid a param/static route conflict. Resend
and broadcast flow through the CSRF guard.
Tests: mail page, delivery detail (+ not-found), resend (+ bad-CSRF),
notifications overview, broadcast form + send (input assertions) + bad game
ids, and unavailable. Plus an integration test that drives /_gm end to end
through the real gateway → backend (401 challenge + authenticated dashboard).
Docs: backend/docs/admin-console.md page inventory completed.
This commit is contained in:
@@ -414,6 +414,13 @@ func registerAdminConsoleRoutes(router *gin.Engine, deps RouterDependencies) {
|
||||
group.POST("/operators/:username/disable", deps.AdminConsole.OperatorDisable())
|
||||
group.POST("/operators/:username/enable", deps.AdminConsole.OperatorEnable())
|
||||
group.POST("/operators/:username/reset-password", deps.AdminConsole.OperatorResetPassword())
|
||||
|
||||
group.GET("/mail", deps.AdminConsole.MailPage())
|
||||
group.GET("/mail/deliveries/:delivery_id", deps.AdminConsole.MailDeliveryDetail())
|
||||
group.POST("/mail/deliveries/:delivery_id/resend", deps.AdminConsole.MailResend())
|
||||
group.GET("/notifications", deps.AdminConsole.NotificationsPage())
|
||||
group.GET("/broadcast", deps.AdminConsole.BroadcastForm())
|
||||
group.POST("/broadcast", deps.AdminConsole.BroadcastSend())
|
||||
}
|
||||
|
||||
// allowedMethodsForPath returns the comma-separated list of methods
|
||||
|
||||
Reference in New Issue
Block a user