Fixed possible undefined error
All checks were successful
Lint / pnpm_install (pull_request) Successful in 2m33s
Test (backend) / unit (22.x) (pull_request) Successful in 7m20s
Test (frontend) / vitest (22.x) (pull_request) Successful in 2m46s
Test (production install and build) / production (22.x) (pull_request) Successful in 3m14s
Test (backend) / validate-api-json (22.x) (pull_request) Successful in 3m23s
Lint / lint (backend) (pull_request) Successful in 3m4s
Lint / lint (misskey-js) (pull_request) Successful in 2m45s
Lint / lint (sw) (pull_request) Successful in 2m30s
Lint / lint (frontend) (pull_request) Successful in 9m10s
Lint / typecheck (backend) (pull_request) Successful in 3m58s
Lint / typecheck (misskey-js) (pull_request) Successful in 2m42s
Test (backend) / e2e (22.x) (pull_request) Successful in 10m37s
All checks were successful
Lint / pnpm_install (pull_request) Successful in 2m33s
Test (backend) / unit (22.x) (pull_request) Successful in 7m20s
Test (frontend) / vitest (22.x) (pull_request) Successful in 2m46s
Test (production install and build) / production (22.x) (pull_request) Successful in 3m14s
Test (backend) / validate-api-json (22.x) (pull_request) Successful in 3m23s
Lint / lint (backend) (pull_request) Successful in 3m4s
Lint / lint (misskey-js) (pull_request) Successful in 2m45s
Lint / lint (sw) (pull_request) Successful in 2m30s
Lint / lint (frontend) (pull_request) Successful in 9m10s
Lint / typecheck (backend) (pull_request) Successful in 3m58s
Lint / typecheck (misskey-js) (pull_request) Successful in 2m42s
Test (backend) / e2e (22.x) (pull_request) Successful in 10m37s
This commit is contained in:
parent
7ed25ef7f5
commit
bf1dac8e8b
1 changed files with 1 additions and 2 deletions
|
@ -98,12 +98,11 @@ export class CaptchaService {
|
||||||
const resp = await result.json() as CaptchaResponse;
|
const resp = await result.json() as CaptchaResponse;
|
||||||
|
|
||||||
if (resp.success !== true) {
|
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}`);
|
throw new Error(`frc-failed: ${errorCodes}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// https://codeberg.org/Gusted/mCaptcha/src/branch/main/mcaptcha.go
|
// https://codeberg.org/Gusted/mCaptcha/src/branch/main/mcaptcha.go
|
||||||
@bindThis
|
@bindThis
|
||||||
public async verifyMcaptcha(secret: string, siteKey: string, instanceHost: string, response: string | null | undefined): Promise<void> {
|
public async verifyMcaptcha(secret: string, siteKey: string, instanceHost: string, response: string | null | undefined): Promise<void> {
|
||||||
|
|
Loading…
Reference in a new issue