MM-15289 Migrate command.GetByTeam to sync by default (#10740)

Этот коммит содержится в:
Puneeth Reddy
2019-04-29 01:20:52 -07:00
коммит произвёл Jesús Espino
родитель 214e9d2ae0
Коммит 171058eb3d
6 изменённых файлов: 43 добавлений и 46 удалений

Просмотреть файл

@@ -257,12 +257,11 @@ func listCommandCmdF(command *cobra.Command, args []string) error {
CommandPrintErrorln("Unable to find team '" + args[i] + "'")
continue
}
result := <-a.Srv.Store.Command().GetByTeam(team.Id)
if result.Err != nil {
commands, err := a.Srv.Store.Command().GetByTeam(team.Id)
if err != nil {
CommandPrintErrorln("Unable to list commands for '" + args[i] + "'")
continue
}
commands := result.Data.([]*model.Command)
for _, command := range commands {
commandListItem := fmt.Sprintf("%s: %s (team: %s)", command.Id, command.DisplayName, team.Name)
CommandPrettyPrintln(commandListItem)