I would like to apply a middleware to a route regardless of the type of request. Currently I have:
router.route('/campaigns') .get(restrictTo('advertiser'), restrictTo('admin'), queries.getCampaigns) .post(restrictTo('advertiser'), restrictTo('admin'), queries.createCampaign);
And I would like something like:
router.route('/campaigns', restrictTo('advertiser'), restrictTo('admin')) .get(queries.getCampaigns) .post(queries.createCampaign);
But this does not seem to work.