diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2017-12-13 05:29:42 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2017-12-13 05:29:42 +0100 |
| commit | 3698f759ef8d643a4456df970236fe9f80cd2a2b (patch) | |
| tree | 5c8e43d241552b809b1297a3fb1c67e3efa3b988 /bucky | |
| parent | 9487da34c83cb78992d4cb7f881aee358018e76a (diff) | |
yup
Diffstat (limited to 'bucky')
| -rw-r--r-- | bucky/app/index.js | 6 | ||||
| -rw-r--r-- | bucky/util/middleware.js | 1 | ||||
| -rw-r--r-- | bucky/util/upload.js | 9 |
3 files changed, 5 insertions, 11 deletions
diff --git a/bucky/app/index.js b/bucky/app/index.js index c445536..248679a 100644 --- a/bucky/app/index.js +++ b/bucky/app/index.js @@ -54,11 +54,7 @@ site.init = function(){ console.log('Bucky listening at http://' + process.env.HOST_NAME + ':%s', server.address().port) }) - upload.init({ - key: process.env.S3_KEY, - secret: process.env.S3_SECRET, - bucket: process.env.S3_BUCKET, - }) + upload.init() site.route(app) diff --git a/bucky/util/middleware.js b/bucky/util/middleware.js index 72d43b9..a744c89 100644 --- a/bucky/util/middleware.js +++ b/bucky/util/middleware.js @@ -1,7 +1,6 @@ var middleware = module.exports = { ensureAuthenticated: function (req, res, next) { - console.log(req.user) if (! req.isAuthenticated()) { req.session.returnTo = req.path return res.redirect('/login') diff --git a/bucky/util/upload.js b/bucky/util/upload.js index a1810a4..d7bf822 100644 --- a/bucky/util/upload.js +++ b/bucky/util/upload.js @@ -13,12 +13,11 @@ var acceptableuploadTypes = { module.exports = {} -module.exports.init = function (opt){ - options = opt +module.exports.init = function (){ s3 = knox.createClient({ - key: opt.key, - secret: opt.secret, - bucket: opt.bucket, + key: process.env.S3_KEY, + secret: process.env.S3_SECRET, + bucket: process.env.S3_BUCKET, }) } |
