res.locals fixing controllers

This commit is contained in:
Simon Martín
2017-10-02 12:07:35 +02:00
parent 783eb0eec7
commit f9d87bc40f
4 changed files with 35 additions and 15 deletions
@@ -74,6 +74,9 @@ module.exports = _.extend({}, serverOptions, {
}
req.params.dbname = 'test_windshaft_cartodb_user_1_db';
// add all params to res.locals
res.locals = _.extend({}, req.params);
// increment number of calls counter
global.req2params_calls = global.req2params_calls ? global.req2params_calls + 1 : 1;