Fixed errcheck issues in server/channels/api4/license_local.go (#28558)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
cb03009992
Коммит
fbdf3cbd14
@@ -54,7 +54,10 @@ func localAddLicense(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
defer file.Close()
|
||||
|
||||
buf := bytes.NewBuffer(nil)
|
||||
io.Copy(buf, file)
|
||||
if _, err := io.Copy(buf, file); err != nil {
|
||||
c.Err = model.NewAppError("addLicense", "api.license.add_license.copy.app_error", nil, "", http.StatusInternalServerError).Wrap(err)
|
||||
return
|
||||
}
|
||||
|
||||
license, appErr := c.App.Srv().SaveLicense(buf.Bytes())
|
||||
if appErr != nil {
|
||||
|
||||
Ссылка в новой задаче
Block a user