summary refs log tree commit diff
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-12-17 17:32:10 +1100
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-12-17 17:32:10 +1100
commit7cca5d32af7829e326a87845deb256bc161b1835 (patch)
treec9fb73f391333c738378c4956c2d7cd191d9241a
parentRemove use of `PRODUCTION` env var (diff)
downloadserver-7cca5d32af7829e326a87845deb256bc161b1835.tar.xz
Remove Slowcord demo user restrictions
-rw-r--r--src/api/routes/users/@me/index.ts3
-rw-r--r--src/api/routes/users/@me/mfa/totp/enable.ts3
2 files changed, 0 insertions, 6 deletions
diff --git a/src/api/routes/users/@me/index.ts b/src/api/routes/users/@me/index.ts
index abfb333a..5738776f 100644
--- a/src/api/routes/users/@me/index.ts
+++ b/src/api/routes/users/@me/index.ts
@@ -36,9 +36,6 @@ router.patch(
 			select: [...PrivateUserProjection, "data"],
 		});
 
-		if (user.email == "demo@maddy.k.vu")
-			throw new HTTPError("Demo user, sorry", 400);
-
 		if (body.avatar)
 			body.avatar = await handleFile(
 				`/avatars/${req.user_id}`,
diff --git a/src/api/routes/users/@me/mfa/totp/enable.ts b/src/api/routes/users/@me/mfa/totp/enable.ts
index 75c64425..2c7044da 100644
--- a/src/api/routes/users/@me/mfa/totp/enable.ts
+++ b/src/api/routes/users/@me/mfa/totp/enable.ts
@@ -23,9 +23,6 @@ router.post(
 			select: ["data", "email"],
 		});
 
-		if (user.email == "demo@maddy.k.vu")
-			throw new HTTPError("Demo user, sorry", 400);
-
 		// TODO: Are guests allowed to enable 2fa?
 		if (user.data.hash) {
 			if (!(await bcrypt.compare(body.password, user.data.hash))) {