Add friendly capcha #36
1 changed files with 1 additions and 2 deletions
|
@ -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> {
|
||||
|
|
Loading…
Reference in a new issue