diff options
-rwxr-xr-x | app.js | 2 | ||||
-rw-r--r-- | src/auth.js | 4 | ||||
-rw-r--r-- | src/files.js | 2 |
3 files changed, 4 insertions, 4 deletions
@@ -25,7 +25,7 @@ router.put('/api/files/*', auth.ldap, multipart, files.put); | |||
25 | router.delete('/api/files/*', auth.ldap, files.del); | 25 | router.delete('/api/files/*', auth.ldap, files.del); |
26 | 26 | ||
27 | // healthcheck in case / does not serve up any file yet | 27 | // healthcheck in case / does not serve up any file yet |
28 | router.get('/', function (req, res) { res.sendfile(path.join(__dirname, '/app/welcome.html')); }); | 28 | router.get('/', function (req, res) { res.sendFile(path.join(__dirname, '/app/welcome.html')); }); |
29 | 29 | ||
30 | app.use(morgan('dev')); | 30 | app.use(morgan('dev')); |
31 | app.use(compression()); | 31 | app.use(compression()); |
diff --git a/src/auth.js b/src/auth.js index 83d0426..c003d2a 100644 --- a/src/auth.js +++ b/src/auth.js | |||
@@ -5,12 +5,12 @@ var passport = require('passport'), | |||
5 | 5 | ||
6 | passport.serializeUser(function (user, done) { | 6 | passport.serializeUser(function (user, done) { |
7 | console.log('serializeUser', user); | 7 | console.log('serializeUser', user); |
8 | done(null, user.id); | 8 | done(null, user.uid); |
9 | }); | 9 | }); |
10 | 10 | ||
11 | passport.deserializeUser(function (id, done) { | 11 | passport.deserializeUser(function (id, done) { |
12 | console.log('deserializeUser', id); | 12 | console.log('deserializeUser', id); |
13 | done(null, { id: id }); | 13 | done(null, { uid: id }); |
14 | }); | 14 | }); |
15 | 15 | ||
16 | var LDAP_URL = process.env.LDAP_URL; | 16 | var LDAP_URL = process.env.LDAP_URL; |
diff --git a/src/files.js b/src/files.js index 6946ff3..c725e4b 100644 --- a/src/files.js +++ b/src/files.js | |||
@@ -75,7 +75,7 @@ function get(req, res, next) { | |||
75 | 75 | ||
76 | debug('get', absoluteFilePath); | 76 | debug('get', absoluteFilePath); |
77 | 77 | ||
78 | if (result.isFile()) return res.sendfile(absoluteFilePath); | 78 | if (result.isFile()) return res.sendFile(absoluteFilePath); |
79 | if (result.isDirectory()) return res.status(200).send({ entries: fs.readdirSync(absoluteFilePath) }); | 79 | if (result.isDirectory()) return res.status(200).send({ entries: fs.readdirSync(absoluteFilePath) }); |
80 | 80 | ||
81 | return next(new HttpError(500, 'unsupported type')); | 81 | return next(new HttpError(500, 'unsupported type')); |