From 84b900caaa14ee3d12f63c51d62ea840e5c5bc89 Mon Sep 17 00:00:00 2001 From: Daniloch Date: Fri, 31 May 2024 11:31:32 -0300 Subject: [PATCH] fix: indentation issues --- src/services/api/routes/v1/forgotPassword.ts | 44 ++++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/src/services/api/routes/v1/forgotPassword.ts b/src/services/api/routes/v1/forgotPassword.ts index 26260ba..b6fd50d 100644 --- a/src/services/api/routes/v1/forgotPassword.ts +++ b/src/services/api/routes/v1/forgotPassword.ts @@ -11,33 +11,33 @@ const router = express.Router(); router.post('/', async (request: express.Request, response: express.Response): Promise => { const input = request.body?.input; const hCaptchaResponse = request.body.hCaptchaResponse?.trim(); - + if (!disabledFeatures.captcha) { - if (!hCaptchaResponse || hCaptchaResponse === "") { - response.status(400).json({ - app: "api", - status: 400, - error: "Must fill in captcha", - }); + if (!hCaptchaResponse || hCaptchaResponse === "") { + response.status(400).json({ + app: "api", + status: 400, + error: "Must fill in captcha", + }); - return; - } + return; + } - const captchaVerify = await hcaptcha.verify( - config.hcaptcha.secret, - hCaptchaResponse - ); + const captchaVerify = await hcaptcha.verify( + config.hcaptcha.secret, + hCaptchaResponse + ); - if (!captchaVerify.success) { - response.status(400).json({ - app: "api", - status: 400, - error: "Captcha verification failed", - }); + if (!captchaVerify.success) { + response.status(400).json({ + app: "api", + status: 400, + error: "Captcha verification failed", + }); - return; - } - } + return; + } + } if (!input || input.trim() === '') { response.status(400).json({