aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xapp.js2
-rw-r--r--src/auth.js4
-rw-r--r--src/files.js2
3 files changed, 4 insertions, 4 deletions
diff --git a/app.js b/app.js
index 5cc70f4..a13ce03 100755
--- a/app.js
+++ b/app.js
@@ -25,7 +25,7 @@ router.put('/api/files/*', auth.ldap, multipart, files.put);
25router.delete('/api/files/*', auth.ldap, files.del); 25router.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
28router.get('/', function (req, res) { res.sendfile(path.join(__dirname, '/app/welcome.html')); }); 28router.get('/', function (req, res) { res.sendFile(path.join(__dirname, '/app/welcome.html')); });
29 29
30app.use(morgan('dev')); 30app.use(morgan('dev'));
31app.use(compression()); 31app.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
6passport.serializeUser(function (user, done) { 6passport.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
11passport.deserializeUser(function (id, done) { 11passport.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
16var LDAP_URL = process.env.LDAP_URL; 16var 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'));