Fix Discord activity auth type issues

cgen-962fbbd315154295bc3e3912c1616676
This commit is contained in:
Builder.io 2025-11-16 07:07:36 +00:00
parent bed085f1ea
commit 8483b0755f
2 changed files with 2 additions and 2 deletions

View file

@ -59,7 +59,7 @@ async function fetchFromGhost(limit: number = 50): Promise<any[]> {
return [];
}
const data: GhostApiResponse = await response.json();
const data = (await response.json()) as GhostApiResponse;
return (
data.posts?.map((post) => ({
id: post.id,

View file

@ -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;