Fix type casting in delete account endpoint
cgen-20760d2558004c7bb85ec8501c10b42d
This commit is contained in:
parent
bbc717abda
commit
9e6adcd36e
3 changed files with 3 additions and 3 deletions
|
|
@ -21,7 +21,7 @@ export default async (req: Request) => {
|
|||
});
|
||||
}
|
||||
|
||||
const { email } = await req.json();
|
||||
const { email } = (await req.json()) as { email?: string };
|
||||
|
||||
if (!email) {
|
||||
return new Response(
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ export default async (req: Request) => {
|
|||
|
||||
try {
|
||||
const supabase = getAdminClient();
|
||||
const { primaryEmail, linkedEmail } = await req.json();
|
||||
const { primaryEmail, linkedEmail } = (await req.json()) as { primaryEmail?: string; linkedEmail?: string };
|
||||
|
||||
if (!primaryEmail || !linkedEmail) {
|
||||
return new Response(
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ export default async (req: Request) => {
|
|||
}
|
||||
|
||||
try {
|
||||
const { email } = await req.json();
|
||||
const { email } = (await req.json()) as { email?: string };
|
||||
|
||||
if (!email) {
|
||||
return new Response(JSON.stringify({ error: "Email is required" }), {
|
||||
|
|
|
|||
Loading…
Reference in a new issue