summaryrefslogtreecommitdiff
path: root/lib/web/auth/ldap
diff options
context:
space:
mode:
authorSheogorath2019-11-20 20:07:35 +0100
committerGitHub2019-11-20 20:07:35 +0100
commit689f5a0a9583fdd774a271a9e6265ee5356d72a0 (patch)
tree754bed08f4724a4bc4f91743f6dfe12f92857c01 /lib/web/auth/ldap
parentf894d3c2fa29865288a31cd80cd2a772ce44b330 (diff)
parentb5ccceff59002034fbb089935076f40b8aa16e58 (diff)
Merge pull request #213 from davidmehren/refactor_backend_notes
First steps in refactoring the backend code
Diffstat (limited to 'lib/web/auth/ldap')
-rw-r--r--lib/web/auth/ldap/index.js4
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 + '/',