Return project branding in /server/info endpoint at all times

This commit is contained in:
rijkvanzanten
2020-10-26 18:52:51 +01:00
parent 58a6aa3f2f
commit b4f82efcee
5 changed files with 46 additions and 38 deletions

View File

@@ -20,12 +20,12 @@ router.get('/ping', (req, res) => res.send('pong'));
router.get(
'/info',
(req, res, next) => {
asyncHandler(async (req, res, next) => {
const service = new ServerService({ accountability: req.accountability });
const data = service.serverInfo();
const data = await service.serverInfo();
res.locals.payload = { data };
return next();
},
}),
respond
);