chore: generate
This commit is contained in:
parent
05f335ce62
commit
fe655b7630
4 changed files with 32 additions and 28 deletions
|
|
@ -20,7 +20,5 @@ export async function POST(event: APIEvent) {
|
|||
}
|
||||
return Referral.create(body.data)
|
||||
.then((result) => Response.json({ success: true, message: "Referral created", result }))
|
||||
.catch((error) =>
|
||||
Response.json({ error: error instanceof Error ? error.message : String(error) }, { status: 400 }),
|
||||
)
|
||||
.catch((error) => Response.json({ error: error instanceof Error ? error.message : String(error) }, { status: 400 }))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,5 @@ export async function DELETE(event: APIEvent) {
|
|||
}
|
||||
return Account.remove(body.data.email)
|
||||
.then(() => Response.json({ success: true, message: "Account deleted" }))
|
||||
.catch((error) =>
|
||||
Response.json({ error: error instanceof Error ? error.message : String(error) }, { status: 400 }),
|
||||
)
|
||||
.catch((error) => Response.json({ error: error instanceof Error ? error.message : String(error) }, { status: 400 }))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue