Remove Slowcord demo user restrictions
This commit is contained in:
parent
eafa93b035
commit
ec6666edee
@ -36,9 +36,6 @@ router.patch(
|
|||||||
select: [...PrivateUserProjection, "data"],
|
select: [...PrivateUserProjection, "data"],
|
||||||
});
|
});
|
||||||
|
|
||||||
if (user.email == "demo@maddy.k.vu")
|
|
||||||
throw new HTTPError("Demo user, sorry", 400);
|
|
||||||
|
|
||||||
if (body.avatar)
|
if (body.avatar)
|
||||||
body.avatar = await handleFile(
|
body.avatar = await handleFile(
|
||||||
`/avatars/${req.user_id}`,
|
`/avatars/${req.user_id}`,
|
||||||
|
@ -23,9 +23,6 @@ router.post(
|
|||||||
select: ["data", "email"],
|
select: ["data", "email"],
|
||||||
});
|
});
|
||||||
|
|
||||||
if (user.email == "demo@maddy.k.vu")
|
|
||||||
throw new HTTPError("Demo user, sorry", 400);
|
|
||||||
|
|
||||||
// TODO: Are guests allowed to enable 2fa?
|
// TODO: Are guests allowed to enable 2fa?
|
||||||
if (user.data.hash) {
|
if (user.data.hash) {
|
||||||
if (!(await bcrypt.compare(body.password, user.data.hash))) {
|
if (!(await bcrypt.compare(body.password, user.data.hash))) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user