Merge branch 'develop' into feat-mijs-expose-error-types

This commit is contained in:
kakkokari-gtyih 2024-10-12 11:52:42 +09:00
parent 3156b2d2b5
commit 28af53e221
1031 changed files with 41072 additions and 16771 deletions

View file

@ -119,5 +119,18 @@ export class CaptchaService {
throw new Error(`turnstile-failed: ${errorCodes}`);
}
}
@bindThis
public async verifyTestcaptcha(response: string | null | undefined): Promise<void> {
if (response == null) {
throw new Error('testcaptcha-failed: no response provided');
}
const success = response === 'testcaptcha-passed';
if (!success) {
throw new Error('testcaptcha-failed');
}
}
}