Update src/server/api/private/signup.ts

This commit is contained in:
Acid Chicken (硫酸鶏) 2020-05-02 10:31:37 +09:00 committed by GitHub
parent d2bbd8438e
commit ee6e720a9c

View file

@ -13,7 +13,7 @@ export default async (ctx: Koa.Context) => {
// Verify *Captcha // Verify *Captcha
// ただしテスト時はこの機構は障害となるため無効にする // ただしテスト時はこの機構は障害となるため無効にする
if (process.env.NODE_ENV !== 'test') { if (process.env.NODE_ENV !== 'test') {
if (instance.enableHcaptcha && instance.hcaptchaSecretKey) { if (instance.enableHcaptcha && instance.hcaptchaSecretKey) {
const success = await verify(instance.hcaptchaSecretKey, body['hcaptcha-response']).then( const success = await verify(instance.hcaptchaSecretKey, body['hcaptcha-response']).then(
({ success }) => success, ({ success }) => success,
() => false, () => false,