mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 20:16:04 +01:00
simplified filter:server.create_routes - routes no longer require you to pass in req, res, name, route (the latter two was a mistake)
tl;dr - just content is all that is required. see http://www.github.com/psychobunny/nodebb-plugin-static-page for more info
This commit is contained in:
@@ -839,8 +839,8 @@ var path = require('path'),
|
||||
app[routes[route].method || 'get'](routes[route].route, function(req, res) {
|
||||
routes[route].options(req, res, function(options) {
|
||||
app.build_header({
|
||||
req: options.req,
|
||||
res: options.res
|
||||
req: options.req || req,
|
||||
res: options.res || res
|
||||
}, function (err, header) {
|
||||
res.send(header + options.content + templates.footer);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user