MM-12356 Add cli command "command delete" (#9553)
* Add cli command for deleting commands * Add code/test for delete command * Fix test * Add confirm flag * Update as per comments * Uncomment test * Fix test
Этот коммит содержится в:
коммит произвёл
George Goldberg
родитель
6232ff3738
Коммит
c317d6f265
@@ -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
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user