Fix Errcheck issues in server/channels/api4/export.go (#28407)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
ba02101bcf
Коммит
71d98443c3
@@ -74,7 +74,6 @@ issues:
|
||||
channels/api4/config_local.go|\
|
||||
channels/api4/config_test.go|\
|
||||
channels/api4/data_retention.go|\
|
||||
channels/api4/export.go|\
|
||||
channels/api4/export_test.go|\
|
||||
channels/api4/file_test.go|\
|
||||
channels/api4/import_test.go|\
|
||||
|
||||
@@ -10,6 +10,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/mattermost/mattermost/server/public/model"
|
||||
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||
"github.com/mattermost/mattermost/server/v8/channels/audit"
|
||||
)
|
||||
|
||||
@@ -38,7 +39,9 @@ func listExports(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
w.Write(data)
|
||||
if _, err := w.Write(data); err != nil {
|
||||
c.Logger.Warn("Error while writing response", mlog.Err(err))
|
||||
}
|
||||
}
|
||||
|
||||
func deleteExport(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
@@ -109,6 +112,8 @@ func generatePresignURLExport(c *Context, w http.ResponseWriter, r *http.Request
|
||||
return
|
||||
}
|
||||
|
||||
w.Write(data)
|
||||
auditRec.Success()
|
||||
if _, err := w.Write(data); err != nil {
|
||||
c.Logger.Warn("Error while writing response", mlog.Err(err))
|
||||
}
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user