Skip to content

Commit c8ce53a

Browse files
committed
Using "kind" not "is_system"
Signed-off-by: Danny Kopping <danny@coder.com>
1 parent 62e1ad2 commit c8ce53a

File tree

7 files changed

+21
-21
lines changed

7 files changed

+21
-21
lines changed

coderd/apidoc/docs.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/apidoc/swagger.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/notifications.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ func (api *API) putNotificationsSettings(rw http.ResponseWriter, r *http.Request
131131
func (api *API) getSystemNotificationTemplates(rw http.ResponseWriter, r *http.Request) {
132132
ctx := r.Context()
133133

134-
templates, err := api.Database.GetSystemNotificationTemplates(ctx)
134+
templates, err := api.Database.GetNotificationTemplatesByKind(ctx, database.NotificationTemplateKindSystem)
135135
if err != nil {
136136
httpapi.Write(r.Context(), rw, http.StatusInternalServerError, codersdk.Response{
137137
Message: "Failed to retrieve system notifications templates.",
@@ -154,7 +154,7 @@ func convertNotificationTemplates(in []database.NotificationTemplate) (out []cod
154154
Actions: string(tmpl.Actions),
155155
Group: tmpl.Group.String,
156156
Method: string(tmpl.Method.NotificationMethod),
157-
IsSystem: tmpl.IsSystem,
157+
Kind: string(tmpl.Kind),
158158
})
159159
}
160160

codersdk/notifications.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ type NotificationTemplate struct {
2323
Actions string `json:"actions" format:""`
2424
Group string `json:"group"`
2525
Method string `json:"method"`
26-
IsSystem bool `json:"is_system"`
26+
Kind string `json:"kind"`
2727
}
2828

2929
// GetNotificationsSettings retrieves the notifications settings, which currently just describes whether all

docs/api/notifications.md

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/api/schemas.md

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

site/src/api/typesGenerated.ts

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)