[MM-16164] Migrate "Team.GetAll" to Sync by default (#11108)

* [MM-16164] Migrate "Team.GetAll" to Sync by default

* Refactor to make code shorter and more descriptive
Этот коммит содержится в:
Bolarinwa Balogun
2019-06-11 07:29:58 -04:00
коммит произвёл George Goldberg
родитель c243b6640c
Коммит 3b03c9afcb
4 изменённых файлов: 23 добавлений и 20 удалений

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

@@ -609,11 +609,7 @@ func (a *App) GetTeamByInviteId(inviteId string) (*model.Team, *model.AppError)
}
func (a *App) GetAllTeams() ([]*model.Team, *model.AppError) {
result := <-a.Srv.Store.Team().GetAll()
if result.Err != nil {
return nil, result.Err
}
return result.Data.([]*model.Team), nil
return a.Srv.Store.Team().GetAll()
}
func (a *App) GetAllTeamsPage(offset int, limit int) ([]*model.Team, *model.AppError) {