fix: role errcheck issues (#28544)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
1d431e72ac
Коммит
9d6adbfea2
@@ -91,7 +91,6 @@ issues:
|
||||
channels/api4/preference_test.go|\
|
||||
channels/api4/reaction_test.go|\
|
||||
channels/api4/remote_cluster.go|\
|
||||
channels/api4/role.go|\
|
||||
channels/api4/role_test.go|\
|
||||
channels/api4/saml.go|\
|
||||
channels/api4/scheme.go|\
|
||||
|
||||
@@ -47,7 +47,10 @@ func getAllRoles(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
w.Write(js)
|
||||
if _, err := w.Write(js); err != nil {
|
||||
c.Logger.Warn("Error while writing response", mlog.Err(err))
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
func getRole(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
@@ -119,7 +122,10 @@ func getRolesByNames(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
w.Write(js)
|
||||
if _, err := w.Write(js); err != nil {
|
||||
c.Logger.Warn("Error while writing response", mlog.Err(err))
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
func patchRole(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
Ссылка в новой задаче
Block a user