Fix type casting in arm affiliations
cgen-4b85470f1cc34fbcbb9db90187212371
This commit is contained in:
parent
c7b6badbe8
commit
1e1917800e
2 changed files with 3 additions and 3 deletions
|
|
@ -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({
|
||||
|
|
|
|||
|
|
@ -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 (
|
||||
|
|
|
|||
Loading…
Reference in a new issue