aboutsummaryrefslogtreecommitdiff
path: root/src/api/routes/auth/registerPOST.js
diff options
context:
space:
mode:
authorPitu <[email protected]>2019-03-02 02:08:11 +0900
committerPitu <[email protected]>2019-03-02 02:08:11 +0900
commit73d85e8c7938e1db30da3cc4354b143d4a078473 (patch)
tree168f25e4d4a6cff7cd21b07f8b3df417ab28ab9e /src/api/routes/auth/registerPOST.js
parentCreate pm2.md (diff)
downloadhost.fuwn.me-73d85e8c7938e1db30da3cc4354b143d4a078473.tar.xz
host.fuwn.me-73d85e8c7938e1db30da3cc4354b143d4a078473.zip
Enviroment variables parsing fix
Diffstat (limited to 'src/api/routes/auth/registerPOST.js')
-rw-r--r--src/api/routes/auth/registerPOST.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/api/routes/auth/registerPOST.js b/src/api/routes/auth/registerPOST.js
index ee8e5ae..0bd8cfd 100644
--- a/src/api/routes/auth/registerPOST.js
+++ b/src/api/routes/auth/registerPOST.js
@@ -10,7 +10,7 @@ class registerPOST extends Route {
}
async run(req, res, db) {
- if (!process.env.USER_ACCOUNTS) return res.status(401).json({ message: 'Creation of new accounts is currently disabled' });
+ if (process.env.USER_ACCOUNTS == 'false') return res.status(401).json({ message: 'Creation of new accounts is currently disabled' });
if (!req.body) return res.status(400).json({ message: 'No body provided' });
const { username, password } = req.body;
if (!username || !password) return res.status(401).json({ message: 'Invalid body provided' });