From 89a271818ed25b0a17a17dd1d6804e34d1f2ec0f Mon Sep 17 00:00:00 2001 From: Pitu Date: Tue, 19 Feb 2019 23:52:24 +0900 Subject: Switch config to .env --- src/api/routes/auth/changePasswordPOST.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/api/routes/auth/changePasswordPOST.js') 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' }); -- cgit v1.2.3