1
0
mirror of https://github.com/matt-fidd/stratos.git synced 2026-01-01 20:39:28 +00:00

Added admin layout and route to switch layouts

This commit is contained in:
2022-02-04 23:43:31 +00:00
parent b091555204
commit 15fd143477
2 changed files with 17 additions and 0 deletions

5
app.js
View File

@@ -80,6 +80,11 @@ async function main() {
}
}));
app.get('/admin/*', (req, res, next) => {
req.app.locals.layout = 'admin';
next();
});
for (const [ root, router ] of loadRoutes().entries())
app.use(root, router);