mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-07-03 17:10:10 +08:00
check for null
This commit is contained in:
@@ -23,7 +23,7 @@ export const config = {
|
||||
const middleware = async (req: NextRequestWithAuth) => {
|
||||
if (req.method === "POST" && req.nextUrl.pathname === "/api/auth/signin/email") {
|
||||
const data = await req.formData();
|
||||
const res = await checkCaptcha(data.get("captcha").toString(), req.ip);
|
||||
const res = await checkCaptcha(data.get("captcha")?.toString(), req.ip);
|
||||
|
||||
if (res.success) {
|
||||
return NextResponse.next();
|
||||
|
||||
Reference in New Issue
Block a user