[MM-60932] Fix errcheck issues in server/channels/api4/usage.go (#28641)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
51ce9733e2
Коммит
d1962e123e
@@ -99,7 +99,6 @@ issues:
|
||||
channels/api4/team_local.go|\
|
||||
channels/api4/team_test.go|\
|
||||
channels/api4/upload_test.go|\
|
||||
channels/api4/usage.go|\
|
||||
channels/api4/usage_test.go|\
|
||||
channels/api4/user.go|\
|
||||
channels/api4/user_local.go|\
|
||||
|
||||
@@ -8,6 +8,7 @@ import (
|
||||
"net/http"
|
||||
|
||||
"github.com/mattermost/mattermost/server/public/model"
|
||||
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||
"github.com/mattermost/mattermost/server/v8/channels/utils"
|
||||
)
|
||||
|
||||
@@ -33,7 +34,9 @@ func getPostsUsage(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
w.Write(json)
|
||||
if _, err := w.Write(json); err != nil {
|
||||
c.Logger.Warn("Error while writing response", mlog.Err(err))
|
||||
}
|
||||
}
|
||||
|
||||
func getStorageUsage(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
@@ -50,7 +53,9 @@ func getStorageUsage(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
w.Write(json)
|
||||
if _, err := w.Write(json); err != nil {
|
||||
c.Logger.Warn("Error while writing response", mlog.Err(err))
|
||||
}
|
||||
}
|
||||
|
||||
func getTeamsUsage(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
@@ -70,5 +75,7 @@ func getTeamsUsage(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
w.Write(json)
|
||||
if _, err := w.Write(json); err != nil {
|
||||
c.Logger.Warn("Error while writing response", mlog.Err(err))
|
||||
}
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user