mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
feat(coderd): add inbox notifications endpoints (#16889)
This PR is part of the inbox notifications topic, and rely on previous PRs merged - it adds : - Endpoints to : - WS : watch new inbox notifications - REST : list inbox notifications - REST : update the read status of a notification Also, this PR acts as a follow-up PR from previous work and : - fix DB query issues - fix DBMem logic to match DB
This commit is contained in:
@ -1387,6 +1387,11 @@ func New(options *Options) *API {
|
||||
})
|
||||
r.Route("/notifications", func(r chi.Router) {
|
||||
r.Use(apiKeyMiddleware)
|
||||
r.Route("/inbox", func(r chi.Router) {
|
||||
r.Get("/", api.listInboxNotifications)
|
||||
r.Get("/watch", api.watchInboxNotifications)
|
||||
r.Put("/{id}/read-status", api.updateInboxNotificationReadStatus)
|
||||
})
|
||||
r.Get("/settings", api.notificationsSettings)
|
||||
r.Put("/settings", api.putNotificationsSettings)
|
||||
r.Route("/templates", func(r chi.Router) {
|
||||
|
Reference in New Issue
Block a user