diff options
| author | Zephyrrus <[email protected]> | 2020-07-08 04:00:12 +0300 |
|---|---|---|
| committer | Zephyrrus <[email protected]> | 2020-07-08 04:00:12 +0300 |
| commit | ad852de51a0d2dd5d29c08838d5a430c58849e74 (patch) | |
| tree | a4ab9a720f66271c9eba10916061a9b06c43656e /src/api/routes/auth/registerPOST.js | |
| parent | refactor: refactor grid to use vuex for every action (diff) | |
| download | host.fuwn.me-ad852de51a0d2dd5d29c08838d5a430c58849e74.tar.xz host.fuwn.me-ad852de51a0d2dd5d29c08838d5a430c58849e74.zip | |
chore: linter the entire project using the new rules
Diffstat (limited to 'src/api/routes/auth/registerPOST.js')
| -rw-r--r-- | src/api/routes/auth/registerPOST.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/api/routes/auth/registerPOST.js b/src/api/routes/auth/registerPOST.js index feeb360..e2ac018 100644 --- a/src/api/routes/auth/registerPOST.js +++ b/src/api/routes/auth/registerPOST.js @@ -1,7 +1,7 @@ -const Route = require('../../structures/Route'); -const log = require('../../utils/Log'); const bcrypt = require('bcrypt'); const moment = require('moment'); +const Route = require('../../structures/Route'); +const log = require('../../utils/Log'); class registerPOST extends Route { constructor() { @@ -9,7 +9,7 @@ class registerPOST extends Route { } async run(req, res, db) { - if (process.env.USER_ACCOUNTS == 'false') 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' }); @@ -50,7 +50,7 @@ class registerPOST extends Route { createdAt: now, editedAt: now, enabled: true, - isAdmin: false + isAdmin: false, }); return res.json({ message: 'The account was created successfully' }); } |