summary refs log tree commit diff
path: root/src/api/routes/auth/login.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/routes/auth/login.ts')
-rw-r--r--src/api/routes/auth/login.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/api/routes/auth/login.ts b/src/api/routes/auth/login.ts
index e6616731..9c6f2335 100644
--- a/src/api/routes/auth/login.ts
+++ b/src/api/routes/auth/login.ts
@@ -72,14 +72,13 @@ router.post(
 				"id",
 				"disabled",
 				"deleted",
-				"settings",
 				"totp_secret",
 				"mfa_enabled",
 				"webauthn_enabled",
 				"security_keys",
 				"verified",
 			],
-			relations: ["security_keys"],
+			relations: ["security_keys", "settings"],
 		}).catch(() => {
 			throw FieldErrors({
 				login: {
@@ -187,7 +186,7 @@ router.post(
 		// Discord header is just the user id as string, which is not possible with npm-jsonwebtoken package
 		// https://user-images.githubusercontent.com/6506416/81051916-dd8c9900-8ec2-11ea-8794-daf12d6f31f0.png
 
-		res.json({ token, settings: user.settings });
+		res.json({ token, settings: { ...user.settings, index: undefined } });
 	},
 );