mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 14:05:46 +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) {
|
app[routes[route].method || 'get'](routes[route].route, function(req, res) {
|
||||||
routes[route].options(req, res, function(options) {
|
routes[route].options(req, res, function(options) {
|
||||||
app.build_header({
|
app.build_header({
|
||||||
req: options.req,
|
req: options.req || req,
|
||||||
res: options.res
|
res: options.res || res
|
||||||
}, function (err, header) {
|
}, function (err, header) {
|
||||||
res.send(header + options.content + templates.footer);
|
res.send(header + options.content + templates.footer);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user