Fix assert unreachable, remove unused variables (#13753)

Small code cleanup
This commit is contained in:
Félix Malfait
2025-08-08 09:04:45 +02:00
committed by GitHub
parent 8b4b9ef8da
commit 0236f79ccf
105 changed files with 172 additions and 315 deletions
@@ -9,12 +9,12 @@ import {
} from 'src/engine/core-modules/captcha/interfaces';
export class GoogleRecaptchaDriver implements CaptchaDriver {
private readonly siteKey: string;
private readonly _siteKey: string;
private readonly secretKey: string;
private readonly httpService: AxiosInstance;
constructor(private options: CaptchaDriverOptions) {
this.siteKey = options.siteKey;
this.secretKey = options.secretKey;
constructor(private _options: CaptchaDriverOptions) {
this._siteKey = _options.siteKey;
this.secretKey = _options.secretKey;
this.httpService = axios.create({
baseURL: 'https://www.google.com/recaptcha/api/siteverify',
});
@@ -9,12 +9,12 @@ import {
} from 'src/engine/core-modules/captcha/interfaces';
export class TurnstileDriver implements CaptchaDriver {
private readonly siteKey: string;
private readonly _siteKey: string;
private readonly secretKey: string;
private readonly httpService: AxiosInstance;
constructor(private options: CaptchaDriverOptions) {
this.siteKey = options.siteKey;
this.secretKey = options.secretKey;
constructor(private _options: CaptchaDriverOptions) {
this._siteKey = _options.siteKey;
this.secretKey = _options.secretKey;
this.httpService = axios.create({
baseURL: 'https://challenges.cloudflare.com/turnstile/v0/siteverify',
});