Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbffa39d

Browse files
committed
Using "kind" not "is_system"
Signed-off-by: Danny Kopping <danny@coder.com>
1 parentc83b156 commitbffa39d

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 aboutcustomizing 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 aboutcustomizing 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
iferr!=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
Actionsstring`json:"actions" format:""`
2424
Groupstring`json:"group"`
2525
Methodstring`json:"method"`
26-
IsSystembool`json:"is_system"`
26+
Kindstring`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 aboutcustomizing 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 aboutcustomizing 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 aboutcustomizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp