Get all teams api4 (#5542)
Этот коммит содержится в:
коммит произвёл
George Goldberg
родитель
83c113595a
Коммит
45edfbe719
16
app/team.go
16
app/team.go
@@ -327,6 +327,14 @@ func GetAllTeams() ([]*model.Team, *model.AppError) {
|
||||
}
|
||||
}
|
||||
|
||||
func GetAllTeamsPage(offset int, limit int) ([]*model.Team, *model.AppError) {
|
||||
if result := <-Srv.Store.Team().GetAllPage(offset, limit); result.Err != nil {
|
||||
return nil, result.Err
|
||||
} else {
|
||||
return result.Data.([]*model.Team), nil
|
||||
}
|
||||
}
|
||||
|
||||
func GetAllOpenTeams() ([]*model.Team, *model.AppError) {
|
||||
if result := <-Srv.Store.Team().GetAllTeamListing(); result.Err != nil {
|
||||
return nil, result.Err
|
||||
@@ -335,6 +343,14 @@ func GetAllOpenTeams() ([]*model.Team, *model.AppError) {
|
||||
}
|
||||
}
|
||||
|
||||
func GetAllOpenTeamsPage(offset int, limit int) ([]*model.Team, *model.AppError) {
|
||||
if result := <-Srv.Store.Team().GetAllTeamPageListing(offset, limit); result.Err != nil {
|
||||
return nil, result.Err
|
||||
} else {
|
||||
return result.Data.([]*model.Team), nil
|
||||
}
|
||||
}
|
||||
|
||||
func GetTeamsForUser(userId string) ([]*model.Team, *model.AppError) {
|
||||
if result := <-Srv.Store.Team().GetTeamsByUserId(userId); result.Err != nil {
|
||||
return nil, result.Err
|
||||
|
||||
Ссылка в новой задаче
Block a user