diff --git a/src/api/routes/auth/forgot.ts b/src/api/routes/auth/forgot.ts
index 6fa86021..a17a2936 100644
--- a/src/api/routes/auth/forgot.ts
+++ b/src/api/routes/auth/forgot.ts
@@ -17,13 +17,7 @@
*/
import { getIpAdress, route, verifyCaptcha } from "@spacebar/api";
-import {
- Config,
- Email,
- FieldErrors,
- ForgotPasswordSchema,
- User,
-} from "@spacebar/util";
+import { Config, Email, FieldErrors, ForgotPasswordSchema, User } from "@spacebar/util";
import { Request, Response, Router } from "express";
import { HTTPError } from "lambert-server";
const router = Router();
@@ -47,10 +41,7 @@ router.post(
const config = Config.get();
- if (
- config.passwordReset.requireCaptcha &&
- config.security.captcha.enabled
- ) {
+ if (config.passwordReset.requireCaptcha && config.security.captcha.enabled) {
const { sitekey, service } = config.security.captcha;
if (!captcha_key) {
return res.status(400).json({
@@ -87,8 +78,7 @@ router.post(
if (!user.email)
throw FieldErrors({
login: {
- message:
- "This account does not have an email address associated with it.",
+ message: "This account does not have an email address associated with it.",
code: "NO_EMAIL",
},
});
@@ -110,12 +100,10 @@ router.post(
return res.sendStatus(204);
})
.catch((e) => {
- console.error(
- `Failed to send password reset email to ${user.username}#${user.discriminator}: ${e}`,
- );
+ console.error(`Failed to send password reset email to ${user.username}#${user.discriminator}: ${e}`);
throw new HTTPError("Failed to send password reset email", 500);
});
- },
+ }
);
export default router;
|