For the code below:
router.use('/campaigns/:campaign_uid', cache.node_cache, api_dynamic_campaign.router);
I have a router route to another router which looks like this:
router.get('/data.json', campaigns);
The handler looks like this:
function campaigns(request, response){
var campaign = api.get_campaign_from_request(request) || request.params.campaign_uid;
api.route_handler(request, response, {"campaign":campaign});
}
My issue is the handler does not have access to campaign_uid in the request.params. How do I access/pass the campaign_uid to the handler?