summary refs log tree commit diff
path: root/api/src/routes/users/@me/disable.ts
diff options
context:
space:
mode:
Diffstat (limited to 'api/src/routes/users/@me/disable.ts')
-rw-r--r--api/src/routes/users/@me/disable.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/api/src/routes/users/@me/disable.ts b/api/src/routes/users/@me/disable.ts
index 259ced96..4aff3774 100644
--- a/api/src/routes/users/@me/disable.ts
+++ b/api/src/routes/users/@me/disable.ts
@@ -6,7 +6,7 @@ import bcrypt from "bcrypt";
 const router = Router();
 
 router.post("/", route({}), async (req: Request, res: Response) => {
-	const user = await User.findOneOrFail({ id: req.user_id }); //User object
+	const user = await User.findOneOrFail({ where: { id: req.user_id }, select: ["data"] }); //User object
 	let correctpass = true;
 
 	if (user.data.hash) {