Skip to content

Commit b655c2c

Browse files
fix(Recaptcha): return { statusCode, body }
1 parent c00c054 commit b655c2c

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

utils/recaptcha.js

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
11
function check_recaptcha_params(name, email, launch) {
22
if (name !== "") {
3-
return { status: 500 }
3+
return {
4+
statusCode: 500,
5+
body: JSON.stringify({ message: "INTERNAL_ERROR" }),
6+
}
47
}
58
if (email !== "") {
6-
return { status: 500 }
9+
return {
10+
statusCode: 500,
11+
body: JSON.stringify({ message: "INTERNAL_ERROR" }),
12+
}
713
}
814
if (launch !== false) {
9-
return { status: 500 }
15+
return {
16+
statusCode: 500,
17+
body: JSON.stringify({ message: "INTERNAL_ERROR" }),
18+
}
1019
}
11-
return { status: 200 }
20+
return { statusCode: 200, body: JSON.stringify({ message: "OK" }) }
1221
}
1322

1423
export { check_recaptcha_params }

0 commit comments

Comments
 (0)