diff --git a/packages/discord-bot/src/utils/api-schema.ts b/packages/discord-bot/src/utils/api-schema.ts index 582a9dc3b..6b19ed677 100644 --- a/packages/discord-bot/src/utils/api-schema.ts +++ b/packages/discord-bot/src/utils/api-schema.ts @@ -24,8 +24,8 @@ export type PraiseForwardInputDto = export type Setting = components['schemas']['Setting']; -export type CommunityPaginatedResponseDto = - components['schemas']['CommunityPaginatedResponseDto']; +export type CommunityFindAllResponseDto = + components['schemas']['CommunityFindAllResponseDto']; export type Community = components['schemas']['Community']; export type PeriodPaginatedResponseDto = diff --git a/packages/discord-bot/src/utils/getHost.ts b/packages/discord-bot/src/utils/getHost.ts index 6fcf76585..54a1386e2 100644 --- a/packages/discord-bot/src/utils/getHost.ts +++ b/packages/discord-bot/src/utils/getHost.ts @@ -1,6 +1,6 @@ import { apiGet } from './api'; import Keyv from 'keyv'; -import { Community, CommunityPaginatedResponseDto } from './api-schema'; +import { Community, CommunityFindAllResponseDto } from './api-schema'; import { DiscordClient } from '../interfaces/DiscordClient'; /** @@ -11,7 +11,7 @@ export const buildCommunityCache = async (cache: Keyv): Promise => { let currPage = 1; let totalPages = 1; while (currPage <= totalPages) { - const communityList = await apiGet( + const communityList = await apiGet( `/communities?page=${currPage}` ).then((res) => res.data);