Simplify page size in mmctl (#26664)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
9fee0393c3
Коммит
b56c65ec2d
@@ -12,7 +12,6 @@ import (
|
||||
"github.com/mattermost/mattermost/server/v8/cmd/mmctl/printer"
|
||||
|
||||
"github.com/mattermost/mattermost/server/public/model"
|
||||
"github.com/mattermost/mattermost/server/v8/channels/web"
|
||||
|
||||
"github.com/hashicorp/go-multierror"
|
||||
"github.com/pkg/errors"
|
||||
@@ -284,7 +283,7 @@ func getAllPublicChannelsForTeam(c client.Client, teamID string) ([]*model.Chann
|
||||
page := 0
|
||||
|
||||
for {
|
||||
channelsPage, _, err := c.GetPublicChannelsForTeam(context.TODO(), teamID, page, web.PerPageMaximum, "")
|
||||
channelsPage, _, err := c.GetPublicChannelsForTeam(context.TODO(), teamID, page, DefaultPageSize, "")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -305,7 +304,7 @@ func getAllDeletedChannelsForTeam(c client.Client, teamID string) ([]*model.Chan
|
||||
page := 0
|
||||
|
||||
for {
|
||||
channelsPage, _, err := c.GetDeletedChannelsForTeam(context.TODO(), teamID, page, web.PerPageMaximum, "")
|
||||
channelsPage, _, err := c.GetDeletedChannelsForTeam(context.TODO(), teamID, page, DefaultPageSize, "")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -561,7 +560,7 @@ func getPrivateChannels(c client.Client, teamID string) ([]*model.Channel, error
|
||||
withoutError := true
|
||||
|
||||
for {
|
||||
channelsPage, _, err := c.GetPrivateChannelsForTeam(context.TODO(), teamID, page, web.PerPageMaximum, "")
|
||||
channelsPage, _, err := c.GetPrivateChannelsForTeam(context.TODO(), teamID, page, DefaultPageSize, "")
|
||||
if err != nil && viper.GetBool("local") {
|
||||
return nil, err
|
||||
} else if err != nil {
|
||||
|
||||
Ссылка в новой задаче
Block a user