From 3a3417cded637b8f582ebd04dedefc2c117d25cd Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Sun, 4 Sep 2022 10:44:33 +0200 Subject: Prettier --- src/api/routes/auth/verify/view-backup-codes-challenge.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/api/routes/auth/verify/view-backup-codes-challenge.ts') diff --git a/src/api/routes/auth/verify/view-backup-codes-challenge.ts b/src/api/routes/auth/verify/view-backup-codes-challenge.ts index d524e0f7..846e186b 100644 --- a/src/api/routes/auth/verify/view-backup-codes-challenge.ts +++ b/src/api/routes/auth/verify/view-backup-codes-challenge.ts @@ -1,6 +1,6 @@ -import { Router, Request, Response } from "express"; import { route } from "@fosscord/api"; -import { FieldErrors, User, BackupCodesChallengeSchema } from "@fosscord/util"; +import { BackupCodesChallengeSchema, FieldErrors, User } from "@fosscord/util"; +import { Request, Response, Router } from "express"; let bcrypt: any; try { @@ -17,13 +17,13 @@ router.post("/", route({ body: "BackupCodesChallengeSchema" }), async (req: Requ const user = await User.findOneOrFail({ where: { id: req.user_id }, select: ["data"] }); - if (!await bcrypt.compare(password, user.data.hash || "")) { + if (!(await bcrypt.compare(password, user.data.hash || ""))) { throw FieldErrors({ password: { message: req.t("auth:login.INVALID_PASSWORD"), code: "INVALID_PASSWORD" } }); } return res.json({ nonce: "NoncePlaceholder", - regenerate_nonce: "RegenNoncePlaceholder", + regenerate_nonce: "RegenNoncePlaceholder" }); }); -- cgit 1.5.1