status/lib/testservices.js
Romein van Buren 1983f78fba
Initial commit
Signed-off-by: Romein van Buren <romein@vburen.nl>
2022-06-22 17:22:19 +02:00

20 lines
443 B
JavaScript

'use strict';
const { testService } = require('./testservice');
async function testServices({ server, settings, makeId }) {
const services = await server
.storage
.store('smartyellow/webservice')
.find({ autotestEnabled: true })
.toArray();
services.forEach(async service => {
if (service.autotestEnabled) {
testService({ service, server, settings, makeId });
}
});
}
module.exports = { testServices };