Commit cfe24a27 by Johannes Zellner

Fix session serialization

1 parent a90a633f
Showing with 4 additions and 4 deletions
......@@ -25,7 +25,7 @@ router.put('/api/files/*', auth.ldap, multipart, files.put);
router.delete('/api/files/*', auth.ldap, files.del);
// healthcheck in case / does not serve up any file yet
router.get('/', function (req, res) { res.sendfile(path.join(__dirname, '/app/welcome.html')); });
router.get('/', function (req, res) { res.sendFile(path.join(__dirname, '/app/welcome.html')); });
app.use(morgan('dev'));
app.use(compression());
......
......@@ -5,12 +5,12 @@ var passport = require('passport'),
passport.serializeUser(function (user, done) {
console.log('serializeUser', user);
done(null, user.id);
done(null, user.uid);
});
passport.deserializeUser(function (id, done) {
console.log('deserializeUser', id);
done(null, { id: id });
done(null, { uid: id });
});
var LDAP_URL = process.env.LDAP_URL;
......
......@@ -75,7 +75,7 @@ function get(req, res, next) {
debug('get', absoluteFilePath);
if (result.isFile()) return res.sendfile(absoluteFilePath);
if (result.isFile()) return res.sendFile(absoluteFilePath);
if (result.isDirectory()) return res.status(200).send({ entries: fs.readdirSync(absoluteFilePath) });
return next(new HttpError(500, 'unsupported type'));
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!