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
v1.18.x
psychobunny 11 years ago
parent 5c048ac20a
commit 7f8836daa4

@ -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);
});

Loading…
Cancel
Save