summaryrefslogtreecommitdiffstats
path: root/app/command.go
diff options
context:
space:
mode:
Diffstat (limited to 'app/command.go')
-rw-r--r--app/command.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/app/command.go b/app/command.go
index 5c7ff6ecf..e1cdc627b 100644
--- a/app/command.go
+++ b/app/command.go
@@ -423,10 +423,9 @@ func (a *App) DeleteCommand(commandId string) *model.AppError {
if !*a.Config().ServiceSettings.EnableCommands {
return model.NewAppError("DeleteCommand", "api.command.disabled.app_error", nil, "", http.StatusNotImplemented)
}
-
- if err := (<-a.Srv.Store.Command().Delete(commandId, model.GetMillis())).Err; err != nil {
- return err
+ result := <-a.Srv.Store.Command().Delete(commandId, model.GetMillis())
+ if result.Err != nil {
+ return result.Err
}
-
return nil
}