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

Commitd1817d1

Browse files
committed
Return early
Signed-off-by: Danny Kopping <danny@coder.com>
1 parentd627fef commitd1817d1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎coderd/notifications.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,12 @@ func (api *API) putNotificationsSettings(rw http.ResponseWriter, r *http.Request
105105
iferr!=nil {
106106
ifrbac.IsUnauthorizedError(err) {
107107
httpapi.Forbidden(rw)
108-
}else {
109-
httpapi.Write(ctx,rw,http.StatusInternalServerError, codersdk.Response{
110-
Message:"Failed to update notifications settings.",
111-
Detail:err.Error(),
112-
})
108+
return
113109
}
110+
httpapi.Write(ctx,rw,http.StatusInternalServerError, codersdk.Response{
111+
Message:"Failed to update notifications settings.",
112+
Detail:err.Error(),
113+
})
114114

115115
return
116116
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp