Add friendly capcha #36

Merged
ashten merged 5 commits from feature/friendly-captcha into main 2025-01-19 07:47:57 +00:00
Showing only changes of commit bf1dac8e8b - Show all commits

View file

@ -98,12 +98,11 @@ export class CaptchaService {
const resp = await result.json() as CaptchaResponse;
if (resp.success !== true) {
const errorCodes = resp['error-codes'] ? resp['errors'].join(', ') : '';
const errorCodes = resp['error-codes'] ? resp['errors']?.join(', ') : '';
throw new Error(`frc-failed: ${errorCodes}`);
}
}
// https://codeberg.org/Gusted/mCaptcha/src/branch/main/mcaptcha.go
@bindThis
public async verifyMcaptcha(secret: string, siteKey: string, instanceHost: string, response: string | null | undefined): Promise<void> {