From 1e1917800e74825fc28a5df832f7f2ac14f22cbd Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Sun, 16 Nov 2025 07:08:24 +0000 Subject: [PATCH] Fix type casting in arm affiliations cgen-4b85470f1cc34fbcbb9db90187212371 --- api/roblox/oauth-callback.ts | 4 ++-- api/user/arm-affiliations.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/roblox/oauth-callback.ts b/api/roblox/oauth-callback.ts index f2221a20..9fd4c99d 100644 --- a/api/roblox/oauth-callback.ts +++ b/api/roblox/oauth-callback.ts @@ -57,7 +57,7 @@ export default async function handler(req: VercelRequest, res: VercelResponse) { return res.status(401).json({ error: "Token exchange failed" }); } - const tokenData: RobloxTokenResponse = await tokenResponse.json(); + const tokenData = (await tokenResponse.json()) as RobloxTokenResponse; // Get user info with access token const userResponse = await fetch( @@ -72,7 +72,7 @@ export default async function handler(req: VercelRequest, res: VercelResponse) { return res.status(401).json({ error: "Failed to fetch user info" }); } - const userInfo: RobloxUserInfo = await userResponse.json(); + const userInfo = (await userResponse.json()) as RobloxUserInfo; // Return user info to frontend return res.status(200).json({ diff --git a/api/user/arm-affiliations.ts b/api/user/arm-affiliations.ts index 21101183..3784f2fc 100644 --- a/api/user/arm-affiliations.ts +++ b/api/user/arm-affiliations.ts @@ -47,7 +47,7 @@ export default async (req: Request) => { // POST - Add or confirm arm affiliation if (req.method === "POST") { - const body = await req.json(); + const body = (await req.json()) as any; const { arm, affiliation_type, affiliation_data, confirmed } = body; if (