This commit is contained in:
syuilo
2022-09-19 03:11:50 +09:00
parent 92c78218bc
commit a2eac9fff6
82 changed files with 671 additions and 671 deletions

View File

@@ -19,7 +19,7 @@ export class CaptchaService {
) {
}
async #getCaptchaResponse(url: string, secret: string, response: string): Promise<CaptchaResponse> {
private async getCaptchaResponse(url: string, secret: string, response: string): Promise<CaptchaResponse> {
const params = new URLSearchParams({
secret,
response,
@@ -46,7 +46,7 @@ export class CaptchaService {
}
public async verifyRecaptcha(secret: string, response: string): Promise<void> {
const result = await this.#getCaptchaResponse('https://www.recaptcha.net/recaptcha/api/siteverify', secret, response).catch(e => {
const result = await this.getCaptchaResponse('https://www.recaptcha.net/recaptcha/api/siteverify', secret, response).catch(e => {
throw `recaptcha-request-failed: ${e}`;
});
@@ -57,7 +57,7 @@ export class CaptchaService {
}
public async verifyHcaptcha(secret: string, response: string): Promise<void> {
const result = await this.#getCaptchaResponse('https://hcaptcha.com/siteverify', secret, response).catch(e => {
const result = await this.getCaptchaResponse('https://hcaptcha.com/siteverify', secret, response).catch(e => {
throw `hcaptcha-request-failed: ${e}`;
});