Compare commits

..

1 commit

Author SHA1 Message Date
Renovate Bot f8f8f21b2e Update dependency express to ^4.18.2
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
ci/woodpecker/push/woodpecker Pipeline failed
2023-11-07 04:01:36 +00:00
2 changed files with 8 additions and 2 deletions

View file

@ -34,7 +34,7 @@
"bootstrap": "^4.6.2", "bootstrap": "^4.6.2",
"cron": "^2.3.1", "cron": "^2.3.1",
"dayjs": "^1.11.0", "dayjs": "^1.11.0",
"express": "^4.17.1", "express": "^4.18.2",
"flag-icon-css": "^3.5.0", "flag-icon-css": "^3.5.0",
"jsonpath-plus": "^6.0.1", "jsonpath-plus": "^6.0.1",
"node-cron": "^3.0.0", "node-cron": "^3.0.0",
@ -50,7 +50,7 @@
"@angular/compiler-cli": "~11.1.0", "@angular/compiler-cli": "~11.1.0",
"@angular/language-service": "~11.1.0", "@angular/language-service": "~11.1.0",
"@nguniversal/builders": "^12.1.0", "@nguniversal/builders": "^12.1.0",
"@types/express": "^4.17.12", "@types/express": "^4.17.21",
"@types/node": "^14.14.22", "@types/node": "^14.14.22",
"@types/jasmine": "~3.6.3", "@types/jasmine": "~3.6.3",
"@types/jasminewd2": "~2.0.8", "@types/jasminewd2": "~2.0.8",

View file

@ -79,6 +79,12 @@ api.post('/update/health', (req, res) => {
return res.status(401).send('invalid token'); return res.status(401).send('invalid token');
} }
const serviceId = req.query.service as string; 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 }[] = []; let services: { id: string, state: string }[] = [];
if (serviceId) { if (serviceId) {
services = [{id: serviceId, state: JSONPath({path: serviceStatePaths[serviceId], json: req.body, wrap: false})}]; services = [{id: serviceId, state: JSONPath({path: serviceStatePaths[serviceId], json: req.body, wrap: false})}];