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

Commit8b3b187

Browse files
committed
fix: swagger
1 parentf603ad6 commit8b3b187

File tree

4 files changed

+18
-10
lines changed

4 files changed

+18
-10
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: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ func (api *API) notificationsSettings(rw http.ResponseWriter, r *http.Request) {
4545
httpapi.Write(r.Context(),rw,http.StatusOK,settings)
4646
}
4747

48-
// @SummaryNotification settings
49-
// @ID notifications-settings
48+
// @SummaryUpdate notifications settings
49+
// @IDupdate-notifications-settings
5050
// @Security CoderSessionToken
5151
// @Accept json
5252
// @Produce json
@@ -69,8 +69,7 @@ func (api *API) putNotificationsSettings(rw http.ResponseWriter, r *http.Request
6969
return
7070
}
7171

72-
/*settingsJSON*/
73-
_,err:=json.Marshal(&settings)
72+
settingsJSON,err:=json.Marshal(&settings)
7473
iferr!=nil {
7574
httpapi.Write(r.Context(),rw,http.StatusInternalServerError, codersdk.Response{
7675
Message:"Failed to marshal notifications settings.",
@@ -93,5 +92,14 @@ func (api *API) putNotificationsSettings(rw http.ResponseWriter, r *http.Request
9392
NotifierPaused:settings.NotifierPaused,
9493
}
9594

96-
// TODO
95+
err=api.Database.UpsertNotificationsSettings(ctx,string(settingsJSON))
96+
iferr!=nil {
97+
httpapi.Write(r.Context(),rw,http.StatusInternalServerError, codersdk.Response{
98+
Message:"Failed to update notifications settings.",
99+
Detail:err.Error(),
100+
})
101+
return
102+
}
103+
104+
httpapi.Write(r.Context(),rw,http.StatusOK,settings)
97105
}

‎docs/api/general.md

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