Fix type casting in profile update endpoint
cgen-4b420964ffc54e1fae0b9e9e28a930c7
This commit is contained in:
parent
0aa7d46acd
commit
d4e6e1d0f3
2 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue