diff --git a/api/applications.ts b/api/applications.ts index 85780a61..ce60c3a6 100644 --- a/api/applications.ts +++ b/api/applications.ts @@ -145,7 +145,7 @@ export async function getApplicationsForOpportunity( export async function submitApplication(req: Request, userId: string) { try { - const body = await req.json(); + const body = (await req.json()) as { opportunity_id?: string; cover_letter?: string }; const { opportunity_id, cover_letter } = body; // Get creator ID for this user diff --git a/api/user/profile-update.ts b/api/user/profile-update.ts index 7f0ff1cf..f8554435 100644 --- a/api/user/profile-update.ts +++ b/api/user/profile-update.ts @@ -19,7 +19,7 @@ export default async (req: Request) => { return new Response("Unauthorized", { status: 401 }); } - const body = await req.json(); + const body = (await req.json()) as any; const userId = userData.user.id; // Sanitize and validate input