diff options
author | David Mehren | 2019-10-27 13:51:53 +0100 |
---|---|---|
committer | David Mehren | 2019-10-27 13:51:53 +0100 |
commit | f78540c3fbf109d6ccf2d92c5b1cf0148c88f722 (patch) | |
tree | 7f8b968b925b8b262cca0f4cd180027abc4b745e /lib/web/auth/ldap | |
parent | 20a67e3446723231961043bffeb5a7b974e891c0 (diff) |
Move note actions to their own file.
Because of circular import problems, this commit also moves the error messages from response.js to errors.js
Signed-off-by: David Mehren <dmehren1@gmail.com>
Diffstat (limited to 'lib/web/auth/ldap')
-rw-r--r-- | lib/web/auth/ldap/index.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/web/auth/ldap/index.js b/lib/web/auth/ldap/index.js index 96143664..28f3e471 100644 --- a/lib/web/auth/ldap/index.js +++ b/lib/web/auth/ldap/index.js @@ -8,7 +8,7 @@ const models = require('../../../models') const logger = require('../../../logger') const { setReturnToFromReferer } = require('../utils') const { urlencodedParser } = require('../../utils') -const response = require('../../../response') +const errors = require('../../../errors') let ldapAuth = module.exports = Router() @@ -81,7 +81,7 @@ passport.use(new LDAPStrategy({ })) ldapAuth.post('/auth/ldap', urlencodedParser, function (req, res, next) { - if (!req.body.username || !req.body.password) return response.errorBadRequest(res) + if (!req.body.username || !req.body.password) return errors.errorBadRequest(res) setReturnToFromReferer(req) passport.authenticate('ldapauth', { successReturnToOrRedirect: config.serverURL + '/', |