From 8483b0755f5b347256a6a0d112864009aa975452 Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Sun, 16 Nov 2025 07:07:36 +0000 Subject: [PATCH] Fix Discord activity auth type issues cgen-962fbbd315154295bc3e3912c1616676 --- api/blog/index.ts | 2 +- api/discord/activity-auth.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/blog/index.ts b/api/blog/index.ts index b947eee0..15bf6f8d 100644 --- a/api/blog/index.ts +++ b/api/blog/index.ts @@ -59,7 +59,7 @@ async function fetchFromGhost(limit: number = 50): Promise { return []; } - const data: GhostApiResponse = await response.json(); + const data = (await response.json()) as GhostApiResponse; return ( data.posts?.map((post) => ({ id: post.id, diff --git a/api/discord/activity-auth.ts b/api/discord/activity-auth.ts index 73749faa..c93d1680 100644 --- a/api/discord/activity-auth.ts +++ b/api/discord/activity-auth.ts @@ -53,7 +53,7 @@ export default async function handler(req: VercelRequest, res: VercelResponse) { throw new Error(`Discord API error: ${discordResponse.statusText}`); } - const discordUser = await discordResponse.json(); + const discordUser = (await discordResponse.json()) as { id: string; username: string; global_name?: string; avatar?: string }; const discord_id = discordUser.id; const discord_username = discordUser.username;