Fixed errcheck issues in server/channels/api4/group_local.go (#28417)

Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
This commit is contained in:
Arya Khochare 2024-10-08 14:17:01 +05:30 committed by GitHub
parent 9d6adbfea2
commit ba02101bcf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 3 deletions

View file

@ -77,7 +77,6 @@ issues:
channels/api4/export.go|\
channels/api4/export_test.go|\
channels/api4/file_test.go|\
channels/api4/group_local.go|\
channels/api4/import_test.go|\
channels/api4/integration_action_test.go|\
channels/api4/ip_filtering_test.go|\

View file

@ -5,6 +5,8 @@ package api4
import (
"net/http"
"github.com/mattermost/mattermost/server/public/shared/mlog"
)
func (api *API) InitGroupLocal() {
@ -23,7 +25,9 @@ func getGroupsByChannelLocal(c *Context, w http.ResponseWriter, r *http.Request)
return
}
w.Write(b)
if _, err := w.Write(b); err != nil {
c.Logger.Warn("Error while writing response", mlog.Err(err))
}
}
func getGroupsByTeamLocal(c *Context, w http.ResponseWriter, r *http.Request) {
@ -37,5 +41,7 @@ func getGroupsByTeamLocal(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
w.Write(b)
if _, err := w.Write(b); err != nil {
c.Logger.Warn("Error while writing response", mlog.Err(err))
}
}