Compare commits

..

No commits in common. "1373a8aede205b79199881c51392611accd6275d" and "51638c66e63cacadbf0561c2d38578fd342a0fb5" have entirely different histories.

2 changed files with 8 additions and 2 deletions

View file

@ -5,7 +5,7 @@ pipeline:
- npm install - npm install
- npm run build:ssr - npm run build:ssr
docker: docker:
image: plugins/docker image: techknowlogick/drone-docker
secrets: secrets:
- DOCKER_USERNAME - DOCKER_USERNAME
- DOCKER_PASSWORD - DOCKER_PASSWORD
@ -17,7 +17,7 @@ pipeline:
event: event:
- push - push
cr: cr:
image: plugins/docker image: techknowlogick/drone-docker
secrets: secrets:
- source: CR_USERNAME - source: CR_USERNAME
target: DOCKER_USERNAME target: DOCKER_USERNAME

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})}];