Skip to content

feat: add killswitch for notifications #13794

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Notifications settings
  • Loading branch information
mtojek committed Jul 10, 2024
commit 89e139634286492c49d9b7676dc488bdeb166d17
2 changes: 1 addition & 1 deletion coderd/apidoc/docs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion coderd/apidoc/swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions coderd/notifications.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func (api *API) notificationsSettings(rw http.ResponseWriter, r *http.Request) {
settingsJSON, err := api.Database.GetNotificationsSettings(r.Context())
if err != nil {
httpapi.Write(r.Context(), rw, http.StatusInternalServerError, codersdk.Response{
Message: "Failed to fetch current notification settings.",
Message: "Failed to fetch current notifications settings.",
Detail: err.Error(),
})
return
Expand All @@ -52,7 +52,7 @@ func (api *API) notificationsSettings(rw http.ResponseWriter, r *http.Request) {
// @Accept json
// @Produce json
// @Tags General
// @Param request body codersdk.NotificationsSettings true "Notification settings request"
// @Param request body codersdk.NotificationsSettings true "Notifications settings request"
// @Success 200 {object} codersdk.NotificationsSettings
// @Router /notifications/settings [put]
func (api *API) putNotificationsSettings(rw http.ResponseWriter, r *http.Request) {
Expand Down Expand Up @@ -82,7 +82,7 @@ func (api *API) putNotificationsSettings(rw http.ResponseWriter, r *http.Request
currentSettingsJSON, err := api.Database.GetNotificationsSettings(r.Context())
if err != nil {
httpapi.Write(r.Context(), rw, http.StatusInternalServerError, codersdk.Response{
Message: "Failed to fetch current notification settings.",
Message: "Failed to fetch current notifications settings.",
Detail: err.Error(),
})
return
Expand Down
6 changes: 3 additions & 3 deletions docs/api/general.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading