diff options
| author | Jules <jules@asdf.us> | 2017-12-15 04:35:48 -0500 |
|---|---|---|
| committer | Jules <jules@asdf.us> | 2017-12-15 04:35:48 -0500 |
| commit | 37fd2b5287ced2b2beb72d9659addaa58ae2521b (patch) | |
| tree | e9a8b80e5fd5808b402a6c3aeedff1f575fa0ceb /bucky | |
| parent | 8c0196b973d936a8659bb27d5f189410bc5f8ea6 (diff) | |
revert ugliness
Diffstat (limited to 'bucky')
| -rw-r--r-- | bucky/app/api.js | 8 | ||||
| -rw-r--r-- | bucky/app/index.js | 13 |
2 files changed, 6 insertions, 15 deletions
diff --git a/bucky/app/api.js b/bucky/app/api.js index b3540ae..5635ce9 100644 --- a/bucky/app/api.js +++ b/bucky/app/api.js @@ -45,21 +45,13 @@ function route (app){ app.get("/api/index", bucky.ensureLastlog, middleware.ensureAuthenticated, - (req,res,next) => {console.log('uthed'); next()}, bucky.ensureLatestThreads, - (req,res,next) => {console.log('lat'); next()}, bucky.filterPrivateThreads, - (req,res,next) => {console.log('priv'); next()}, bucky.ensureCommentCountsForThreads, - (req,res,next) => {console.log('com'); next()}, bucky.ensureFileCountsForThreads, - (req,res,next) => {console.log('fil'); next()}, bucky.ensureKeywordsForThreads, - (req,res,next) => {console.log('keyz'); next()}, bucky.ensureHootbox, - (req,res,next) => {console.log('hootz'); next()}, bucky.bumpLastSeen, - (req,res,next) => {console.log('done'); next()}, function(req, res){ res.json({ threads: res.threads, diff --git a/bucky/app/index.js b/bucky/app/index.js index 3577bc5..5b541d0 100644 --- a/bucky/app/index.js +++ b/bucky/app/index.js @@ -54,8 +54,7 @@ site.init = function(){ saveUninitialized: false, })) - upload.init() - federate.route(app) +// federate.route(app) // app.use(csurf({ // cookie: true, @@ -63,17 +62,18 @@ site.init = function(){ // })) app.disable('x-powered-by') + auth.init() app.use(express.query()) - app.use(passport.initialize()) - app.use(passport.session()) + app.use(passport.initialize()) + app.use(passport.session()) server = http.createServer(app).listen(process.env.PORT || 5000, function () { console.log('Bucky listening at http://' + process.env.HOST_NAME + ':%s', server.address().port) }) - auth.init() + upload.init() - app.all('*', middleware.ensureLocals) + app.all('*', middleware.ensureLocals) api.route(app) pages.route(app) @@ -88,6 +88,5 @@ site.init = function(){ require('../bin/build-scripts') } } - site.api = require('./api') site.pages = require('./pages') |
