[GH-26715] Added Pagination Support for IncomingWebHooks (#27502)
* Added Pagination Support for IncomingWebHooks * Incorporated feedback from reviews * Removed trailing spaces * Restored deleted server en.json entries, fixed order in webapp en.json --------- Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
@@ -87,6 +87,7 @@ import type {
|
||||
CommandResponse,
|
||||
DialogSubmission,
|
||||
IncomingWebhook,
|
||||
IncomingWebhooksWithCount,
|
||||
OAuthApp,
|
||||
OutgoingOAuthConnection,
|
||||
OutgoingWebhook,
|
||||
@@ -2625,17 +2626,18 @@ export default class Client4 {
|
||||
);
|
||||
};
|
||||
|
||||
getIncomingWebhooks = (teamId = '', page = 0, perPage = PER_PAGE_DEFAULT) => {
|
||||
getIncomingWebhooks = (teamId = '', page = 0, perPage = PER_PAGE_DEFAULT, includeTotalCount = false) => {
|
||||
const queryParams: any = {
|
||||
page,
|
||||
per_page: perPage,
|
||||
include_total_count: includeTotalCount,
|
||||
};
|
||||
|
||||
if (teamId) {
|
||||
queryParams.team_id = teamId;
|
||||
}
|
||||
|
||||
return this.doFetch<IncomingWebhook[]>(
|
||||
return this.doFetch<IncomingWebhook[] | IncomingWebhooksWithCount>(
|
||||
`${this.getIncomingHooksRoute()}${buildQueryString(queryParams)}`,
|
||||
{method: 'get'},
|
||||
);
|
||||
|
||||
Ссылка в новой задаче
Block a user