wip
This commit is contained in:
@@ -27,7 +27,10 @@ export async function POST(request: Request) {
|
||||
return jsonError(400, 'Invalid request body');
|
||||
}
|
||||
|
||||
const email = (body as any)?.email;
|
||||
const email =
|
||||
typeof body === 'object' && body !== null && 'email' in body
|
||||
? (body as { email: unknown }).email
|
||||
: undefined;
|
||||
|
||||
if (typeof email !== 'string' || !email.trim()) {
|
||||
return jsonError(400, 'Invalid email address');
|
||||
|
||||
Reference in New Issue
Block a user