New answers tagged

1

I managed to accomplish this by adding the agency to res.locals. Here's the amended code: // /routes/v1/index.js const router = require("express-promise-router")() router.use(["/agencies/:id", "/agencies/:id/*"], agencies.addAgencyToResLocals, agencies.ensureUserIsMember) router .route("/agencies/:id") .get(agencies.getById) .patch(agencies....


Top 50 recent answers are included