Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

use await

Blue Mouseb4d24cf647a9
diff --git a/src/captcha/captcha.controller.ts b/src/captcha/captcha.controller.ts
index 2b3810fe2..91f0daf8d 100644
--- a/src/captcha/captcha.controller.ts
+++ b/src/captcha/captcha.controller.ts
@@ -40,7 +40,7 @@ export class CaptchaController {
theme = DEFAULT_THEME, pid,
} = generateDTO
- this.captchaService.validatePIDForCAPTCHA(pid)
+ await this.captchaService.validatePIDForCAPTCHA(pid)
return await this.captchaService.generateCaptcha(theme, pid)
}
@@ -66,7 +66,7 @@ export class CaptchaController {
code, hash, pid,
} = manualDTO
- this.captchaService.validatePIDForCAPTCHA(pid)
+ await this.captchaService.validatePIDForCAPTCHA(pid)
if (!this.captchaService.verifyCaptcha(code, hash, pid)) {
throw new ForbiddenException('Incorrect captcha')
@@ -122,7 +122,7 @@ export class CaptchaController {
const { pid } = automaticDTO
- this.captchaService.validatePIDForCAPTCHA(pid)
+ await this.captchaService.validatePIDForCAPTCHA(pid)
// @ts-ignore
let tokenCookie = request?.cookies?.[CAPTCHA_COOKIE_KEY]