* [MM-16182] Migrate Team.GetTeamsForUserWithPagination to Sync by default #11117 + Team.GetTeamsForUserWithPagination returns ([]*model.TeamMember, *model.AppError) now instead of StoreChannel. + Updated mock. + Updated tests to use new explicit async. * Fix Whitespace from go fmt * Changed team_store.go to not use explicit async. * Fixed up files from the review + Dont reassign var to ms. + Avoid nesting of the fetch calls. + Directly return fetch instead of nil, err and team, nil.
Этот коммит содержится в:
коммит произвёл
Jesús Espino
родитель
33789a3523
Коммит
3c13b0e4e7
@@ -675,11 +675,7 @@ func (a *App) GetTeamMembersForUser(userId string) ([]*model.TeamMember, *model.
|
||||
}
|
||||
|
||||
func (a *App) GetTeamMembersForUserWithPagination(userId string, page, perPage int) ([]*model.TeamMember, *model.AppError) {
|
||||
result := <-a.Srv.Store.Team().GetTeamsForUserWithPagination(userId, page, perPage)
|
||||
if result.Err != nil {
|
||||
return nil, result.Err
|
||||
}
|
||||
return result.Data.([]*model.TeamMember), nil
|
||||
return a.Srv.Store.Team().GetTeamsForUserWithPagination(userId, page, perPage)
|
||||
}
|
||||
|
||||
func (a *App) GetTeamMembers(teamId string, offset int, limit int, restrictions *model.ViewUsersRestrictions) ([]*model.TeamMember, *model.AppError) {
|
||||
|
||||
Ссылка в новой задаче
Block a user