[MM-49243] - Use paged requests to request the list of teams (#26278)
Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
087c993bed
Коммит
4bbcfd74ad
@@ -92,7 +92,9 @@ func listWebhookCmdF(c client.Client, command *cobra.Command, args []string) err
|
||||
if len(args) < 1 {
|
||||
var err error
|
||||
// If no team is specified, list all teams
|
||||
teams, _, err = c.GetAllTeams(context.TODO(), "", 0, 100000000)
|
||||
teams, err = getPages(func(page, numPerPage int, etag string) ([]*model.Team, *model.Response, error) {
|
||||
return c.GetAllTeams(context.TODO(), etag, page, numPerPage)
|
||||
}, DefaultPageSize)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user