summaryrefslogtreecommitdiffstats
path: root/app/command.go
diff options
context:
space:
mode:
Diffstat (limited to 'app/command.go')
-rw-r--r--app/command.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/command.go b/app/command.go
index d3e36b0e0..6e439537e 100644
--- a/app/command.go
+++ b/app/command.go
@@ -336,6 +336,16 @@ func (a *App) UpdateCommand(oldCmd, updatedCmd *model.Command) (*model.Command,
}
}
+func (a *App) MoveCommand(team *model.Team, command *model.Command) *model.AppError {
+ command.TeamId = team.Id
+
+ if result := <-a.Srv.Store.Command().Update(command); result.Err != nil {
+ return result.Err
+ }
+
+ return nil
+}
+
func (a *App) RegenCommandToken(cmd *model.Command) (*model.Command, *model.AppError) {
if !*utils.Cfg.ServiceSettings.EnableCommands {
return nil, model.NewAppError("RegenCommandToken", "api.command.disabled.app_error", nil, "", http.StatusNotImplemented)