From 2a6d17974e73aff3a9e9c251a479bcf2b889e4e3 Mon Sep 17 00:00:00 2001 From: Lexi Kronowitz Date: Wed, 9 Oct 2024 13:35:34 -0400 Subject: [PATCH] Currently stuck here --- src/middleware/index.js | 1 + src/routes/index.js | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/middleware/index.js b/src/middleware/index.js index 80a5f568c6..0a96436992 100644 --- a/src/middleware/index.js +++ b/src/middleware/index.js @@ -160,6 +160,7 @@ middleware.privateTagListing = helpers.try(async (req, res, next) => { next(); }); + middleware.exposeGroupName = helpers.try(async (req, res, next) => { await expose('groupName', groups.getGroupNameByGroupSlug, 'slug', req, res, next); }); diff --git a/src/routes/index.js b/src/routes/index.js index a363f0b298..9f8d41d1e5 100644 --- a/src/routes/index.js +++ b/src/routes/index.js @@ -84,7 +84,9 @@ _mounts.categories = (app, name, middleware, controllers) => { }; _mounts.additionalInfo = (app, name, middleware, controllers) => { - setupPageRoute(app, `/${name}`, [], controllers.additionalInfo.list); + const middlewares = [middleware.canViewInfo]; + + setupPageRoute(app, `/${name}`, middlewares, controllers.additionalInfo.list); }; _mounts.category = (app, name, middleware, controllers) => {