From 7510dabd9c15ad2672f686a821de0fe9fdbb642d Mon Sep 17 00:00:00 2001 From: Kristofer Date: Thu, 24 Aug 2023 08:43:04 +0200 Subject: [PATCH] Type name change --- packages/discord-bot/src/utils/api-schema.ts | 4 ++-- packages/discord-bot/src/utils/getHost.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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);