diff options
author | Johannes Zellner <johannes@nebulon.de> | 2015-06-27 20:03:41 +0200 |
---|---|---|
committer | Johannes Zellner <johannes@nebulon.de> | 2015-06-27 20:03:41 +0200 |
commit | cfe24a278b68cd859e8f98cb0d8be92d49508a32 (patch) | |
tree | 651aa8512b253ffebec818f7e35462a96c438579 /src | |
parent | a90a633f030f44bd8142e1d44a8312e952e620bb (diff) | |
download | Surfer-cfe24a278b68cd859e8f98cb0d8be92d49508a32.tar.gz Surfer-cfe24a278b68cd859e8f98cb0d8be92d49508a32.tar.zst Surfer-cfe24a278b68cd859e8f98cb0d8be92d49508a32.zip |
Fix session serialization
Diffstat (limited to 'src')
-rw-r--r-- | src/auth.js | 4 | ||||
-rw-r--r-- | src/files.js | 2 |
2 files changed, 3 insertions, 3 deletions
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')); |