aboutsummaryrefslogtreecommitdiff
path: root/src/api/routes/auth/changePasswordPOST.js
diff options
context:
space:
mode:
authorPitu <[email protected]>2019-02-19 23:52:24 +0900
committerPitu <[email protected]>2019-02-19 23:52:24 +0900
commit89a271818ed25b0a17a17dd1d6804e34d1f2ec0f (patch)
tree2e63d3b41eeacb8f172f8ee3e1374124b934c6a3 /src/api/routes/auth/changePasswordPOST.js
parentCreate wizard.js (diff)
downloadhost.fuwn.me-89a271818ed25b0a17a17dd1d6804e34d1f2ec0f.tar.xz
host.fuwn.me-89a271818ed25b0a17a17dd1d6804e34d1f2ec0f.zip
Switch config to .env
Diffstat (limited to 'src/api/routes/auth/changePasswordPOST.js')
-rw-r--r--src/api/routes/auth/changePasswordPOST.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/api/routes/auth/changePasswordPOST.js b/src/api/routes/auth/changePasswordPOST.js
index bd64320..d698896 100644
--- a/src/api/routes/auth/changePasswordPOST.js
+++ b/src/api/routes/auth/changePasswordPOST.js
@@ -1,7 +1,5 @@
const Route = require('../../structures/Route');
-const config = require('../../../../config');
const log = require('../../utils/Log');
-const db = require('knex')(config.server.database);
const bcrypt = require('bcrypt');
const moment = require('moment');
@@ -10,7 +8,7 @@ class changePasswordPOST extends Route {
super('/auth/password/change', 'post');
}
- async run(req, res, user) {
+ async run(req, res, db, user) {
if (!req.body) return res.status(400).json({ message: 'No body provided' });
const { password, newPassword } = req.body;
if (!password || !newPassword) return res.status(401).json({ message: 'Invalid body provided' });