Compare commits

..

1 commit

Author SHA1 Message Date
Renovate Bot e1d9ed1573 Update dependency @nguniversal/express-engine to ^12.1.3
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/pr/woodpecker Pipeline was successful
2023-07-15 04:01:42 +00:00
2 changed files with 7 additions and 1 deletions

View file

@ -27,7 +27,7 @@
"@angular/platform-server": "~11.1.0",
"@angular/router": "~11.1.0",
"@fortawesome/fontawesome-free": "^5.15.4",
"@nguniversal/express-engine": "^12.1.0",
"@nguniversal/express-engine": "^12.1.3",
"@ngx-translate/core": "^13.0.0",
"@ngx-translate/http-loader": "^6.0.0",
"@types/node-cron": "^2.0.5",

View file

@ -79,6 +79,12 @@ api.post('/update/health', (req, res) => {
return res.status(401).send('invalid token');
}
const serviceId = req.query.service as string;
if (!config.groups
.map(g => g.services).reduce((x, y) => x.concat(y), [])
.map(s => s.id).includes(serviceId)) {
// TODO remove old caches
return res.send('OK');
}
let services: { id: string, state: string }[] = [];
if (serviceId) {
services = [{id: serviceId, state: JSONPath({path: serviceStatePaths[serviceId], json: req.body, wrap: false})}];