core: add hydrooj install command

This commit is contained in:
undefined committed 2022-11-04 01:47:48 +08:00
1 parent e92cbeb1ee
commit bf37fb4848
14 files changed
+62 -26

No files matched your search

+5 -1
View File
@@ -15,7 +15,7 @@ export function apply(ctx: Context) {
.field('secret', SystemModel.get('recaptcha.secret'))
.field('response', thisArg.args.captcha)
.field('remoteip', thisArg.request.ip);
if (!response.body.success) throw new ForbiddenError('captcha fail');
if (!response.body.success) throw new ForbiddenError('Failed to solve the captcha.');
});
ctx.on('handler/after/UserRegister', async (thisArg) => {
@@ -24,4 +24,8 @@ export function apply(ctx: Context) {
<input type="text" name="captcha" id="_captcha" style="display:none">
<input type="submit" id="_submit" style="display:none">`;
});
ctx.i18n.load('zh', {
'Failed to solve the captcha': '没有通过 ReCaptcha 验证。',
});
}