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
commitec6666edee71bfddf971f834cfc89e89f930bf01 (patch)
treecef1497b3723bd707951ae999956f097333c91a5
parentRemove use of `PRODUCTION` env var (diff)
downloadserver-ec6666edee71bfddf971f834cfc89e89f930bf01.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))) {