From 28a4c2dba8073231d0678790768e4776748c2b0a Mon Sep 17 00:00:00 2001 From: "Claude (Chronicler #57)" Date: Fri, 3 Apr 2026 17:20:06 +0000 Subject: [PATCH] fix: add missing title parameter for admin dashboard layout ISSUE: Layout.ejs expects 'title' parameter but admin route wasn't passing it FIX: Added title: 'Dashboard' to render context Added error.message to error output for debugging Signed-off-by: Claude (Chronicler #57) --- services/arbiter-3.0/src/routes/admin.js | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/services/arbiter-3.0/src/routes/admin.js b/services/arbiter-3.0/src/routes/admin.js index fd8f8d9..7f43def 100644 --- a/services/arbiter-3.0/src/routes/admin.js +++ b/services/arbiter-3.0/src/routes/admin.js @@ -11,13 +11,19 @@ const isAdmin = (req, res, next) => { }; // TODO: Replace with full beautiful UI from live bot.js -router.get('/', isAdmin, (req, res) => { - const mappings = getRoleMappings(); - res.render('admin/dashboard', { - user: req.user, - mappings, - csrfToken: req.csrfToken() - }); +router.get('/', isAdmin, async (req, res) => { + try { + const mappings = getRoleMappings(); + res.render('admin/dashboard', { + title: 'Dashboard', + user: req.user, + csrfToken: req.csrfToken(), + mappings: mappings + }); + } catch (error) { + console.error('Admin dashboard error:', error); + res.status(500).send('Internal Server Error: ' + error.message); + } }); router.post('/mappings', isAdmin, express.json(), (req, res) => {