fix: reaction errcheck issues (#28513)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
1f3eab8adb
Коммит
845159d501
@@ -89,7 +89,8 @@ issues:
|
|||||||
channels/api4/plugin.go|\
|
channels/api4/plugin.go|\
|
||||||
channels/api4/plugin_test.go|\
|
channels/api4/plugin_test.go|\
|
||||||
channels/api4/post_test.go|\
|
channels/api4/post_test.go|\
|
||||||
channels/api4/reaction.go|\
|
channels/api4/preference_test.go|\
|
||||||
|
channels/api4/reaction_test.go|\
|
||||||
channels/api4/remote_cluster.go|\
|
channels/api4/remote_cluster.go|\
|
||||||
channels/api4/role.go|\
|
channels/api4/role.go|\
|
||||||
channels/api4/role_test.go|\
|
channels/api4/role_test.go|\
|
||||||
|
|||||||
@@ -74,7 +74,9 @@ func getReactions(c *Context, w http.ResponseWriter, r *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
w.Write(js)
|
if _, err := w.Write(js); err != nil {
|
||||||
|
c.Logger.Warn("Error while writing js response", mlog.Err(err))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func deleteReaction(c *Context, w http.ResponseWriter, r *http.Request) {
|
func deleteReaction(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||||
@@ -131,5 +133,7 @@ func getBulkReactions(c *Context, w http.ResponseWriter, r *http.Request) {
|
|||||||
c.Err = model.NewAppError("getBulkReactions", "api.marshal_error", nil, "", http.StatusInternalServerError).Wrap(err)
|
c.Err = model.NewAppError("getBulkReactions", "api.marshal_error", nil, "", http.StatusInternalServerError).Wrap(err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
w.Write(js)
|
if _, err := w.Write(js); err != nil {
|
||||||
|
c.Logger.Warn("Error while writing js response", mlog.Err(err))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user