From 215ec041bb5d124aba6ad2b036b36aad35785c71 Mon Sep 17 00:00:00 2001 From: RefinedSoftwareLLC Date: Thu, 7 Aug 2014 09:14:28 -0600 Subject: [PATCH 1/4] Corrected node.js version requirement. package.json was being told that nodebb only required version >=0.8.x of node. Per documentation and communication with developers this should be >=0.10.x Changing this should help users who accidentally run nodebb on node.js 0.8 to run it on a supported version of 0.10.x or highter. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9440e3b6b3..9c596d0b3d 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "url": "https://github.com/NodeBB/NodeBB/issues" }, "engines": { - "node": ">=0.8" + "node": ">=0.10" }, "maintainers": [ { From 01f5acea9bc2e0cc54550d64f892ff485370b30f Mon Sep 17 00:00:00 2001 From: nchase Date: Sun, 17 Aug 2014 23:34:08 -0400 Subject: [PATCH 2/4] fix link to travis-ci build in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 485922d449..b08b6c3a84 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # NodeBB -[![Build Status](https://travis-ci.org/NodeBB/NodeBB.svg?branch=master)](https://travis-ci.org/nodebb/nodebb) +[![Build Status](https://travis-ci.org/NodeBB/NodeBB.svg?branch=master)](https://travis-ci.org/NodeBB/NodeBB) [![Dependency Status](https://david-dm.org/nodebb/nodebb.svg)](https://david-dm.org/nodebb/nodebb) [![Code Climate](https://codeclimate.com/github/designcreateplay/NodeBB.png)](https://codeclimate.com/github/designcreateplay/NodeBB) From 4dd32e1024f35b4e9fed5bf55ab33a1b62542d26 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Mon, 18 Aug 2014 13:05:13 -0400 Subject: [PATCH 3/4] filter:category.get applies to all category-like API calls now @a5mith https://gist.github.com/psychobunny/572d867935469774c6e8#comment-1281883 --- src/controllers/categories.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/controllers/categories.js b/src/controllers/categories.js index 506747f741..d11567c4de 100644 --- a/src/controllers/categories.js +++ b/src/controllers/categories.js @@ -8,7 +8,8 @@ var categoriesController = {}, user = require('./../user'), categories = require('./../categories'), topics = require('./../topics'), - meta = require('./../meta'); + meta = require('./../meta'), + plugins = require('./../plugins'); categoriesController.recent = function(req, res, next) { var uid = req.user ? req.user.uid : 0; @@ -19,7 +20,9 @@ categoriesController.recent = function(req, res, next) { data['feeds:disableRSS'] = meta.config['feeds:disableRSS'] === '1' ? true : false; - res.render('recent', data); + plugins.fireHook('filter:category.get', data, uid, function(err, data) { + res.render('recent', data); + }); }); }; @@ -35,7 +38,9 @@ categoriesController.popular = function(req, res, next) { data['feeds:disableRSS'] = meta.config['feeds:disableRSS'] === '1' ? true : false; - res.render('popular', {topics: data}); + plugins.fireHook('filter:category.get', {topics: data}, uid, function(err, data) { + res.render('popular', data); + }); }); }; @@ -47,7 +52,9 @@ categoriesController.unread = function(req, res, next) { return next(err); } - res.render('unread', data); + plugins.fireHook('filter:category.get', data, uid, function(err, data) { + res.render('unread', data); + }); }); }; From 74e552449271b2665e2dcfc2fa64bc137dce1a32 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Mon, 18 Aug 2014 13:44:27 -0400 Subject: [PATCH 4/4] fixing request to /api not returning api result --- src/routes/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/index.js b/src/routes/index.js index e53ebbe275..e843175098 100644 --- a/src/routes/index.js +++ b/src/routes/index.js @@ -160,7 +160,7 @@ module.exports = function(app, middleware) { app.render.apply(app, arguments); }; - app.all(relativePath + '/api/*', middleware.updateLastOnlineTime, middleware.prepareAPI); + app.all(relativePath + '/api/?*', middleware.updateLastOnlineTime, middleware.prepareAPI); app.all(relativePath + '/api/admin/*', middleware.admin.isAdmin, middleware.prepareAPI); app.all(relativePath + '/admin/*', middleware.admin.isAdmin); app.get(relativePath + '/admin', middleware.admin.isAdmin); @@ -247,4 +247,4 @@ function catch404(req, res, next) { } else { res.type('txt').send('Not found'); } -} \ No newline at end of file +}