Create type definition for 'recaptcha-promise' (#4068)
This commit is contained in:
committed by
GitHub
parent
ceda3dd72a
commit
ce576dea8f
@ -8,14 +8,13 @@ import Meta from '../../../models/meta';
|
||||
import RegistrationTicket from '../../../models/registration-tickets';
|
||||
import usersChart from '../../../chart/users';
|
||||
import fetchMeta from '../../../misc/fetch-meta';
|
||||
import * as recaptcha from 'recaptcha-promise';
|
||||
|
||||
export default async (ctx: Koa.BaseContext) => {
|
||||
const body = ctx.request.body as any;
|
||||
|
||||
const instance = await fetchMeta();
|
||||
|
||||
const recaptcha = require('recaptcha-promise');
|
||||
|
||||
// Verify recaptcha
|
||||
// ただしテスト時はこの機構は障害となるため無効にする
|
||||
if (process.env.NODE_ENV !== 'test' && instance.enableRecaptcha) {
|
||||
|
Reference in New Issue
Block a user