diff --git a/api/creators.ts b/api/creators.ts index 1488f8e1..28376a4f 100644 --- a/api/creators.ts +++ b/api/creators.ts @@ -119,7 +119,7 @@ export async function getCreatorByUsername(username: string) { export async function createCreatorProfile(req: Request, userId: string) { try { - const body = await req.json(); + const body = (await req.json()) as any; const { username, bio, @@ -164,7 +164,7 @@ export async function createCreatorProfile(req: Request, userId: string) { export async function updateCreatorProfile(req: Request, userId: string) { try { - const body = await req.json(); + const body = (await req.json()) as any; const { username, bio, diff --git a/api/devconnect-links.ts b/api/devconnect-links.ts index d3192384..482bc1b8 100644 --- a/api/devconnect-links.ts +++ b/api/devconnect-links.ts @@ -7,7 +7,7 @@ const supabase = createClient(supabaseUrl, supabaseServiceRole); export async function linkDevConnectAccount(req: Request, userId: string) { try { - const body = await req.json(); + const body = (await req.json()) as { devconnect_username?: string; devconnect_profile_url?: string }; const { devconnect_username, devconnect_profile_url } = body; if (!devconnect_username) { diff --git a/api/discord/register-commands.ts b/api/discord/register-commands.ts index 9048e09e..ed4841aa 100644 --- a/api/discord/register-commands.ts +++ b/api/discord/register-commands.ts @@ -87,7 +87,7 @@ export default async function handler(req: VercelRequest, res: VercelResponse) { ); if (!response.ok) { - const errorData = await response.json(); + const errorData = (await response.json()) as any; console.error("[Discord] Registration error:", errorData); return res.status(response.status).json({ error: "Failed to register commands", @@ -95,7 +95,7 @@ export default async function handler(req: VercelRequest, res: VercelResponse) { }); } - const data = await response.json(); + const data = (await response.json()) as any[]; console.log("[Discord] Successfully registered commands:", data); return res.status(200).json({