mirror of
https://github.com/smartyellow/status.git
synced 2025-06-28 04:35:11 +00:00
"Test now" button
This commit is contained in:
@ -2,13 +2,17 @@
|
||||
|
||||
const { makeId } = require('core/makeid');
|
||||
|
||||
async function processOutage({ outage, server, settings }) {
|
||||
async function processOutage({ outage, server, settings, onDateUpdated }) {
|
||||
if (typeof onDateUpdated !== 'function') {
|
||||
onDateUpdated = () => null;
|
||||
}
|
||||
|
||||
for (const [ id, testResult ] of Object.entries(outage)) {
|
||||
// Update check date
|
||||
server.storage.store('smartyellow/webservice').update(
|
||||
{ id },
|
||||
{ $set: { lastChecked: new Date() } }
|
||||
);
|
||||
).then(() => onDateUpdated(id));
|
||||
|
||||
// Get service entry
|
||||
const service = await server
|
||||
|
Reference in New Issue
Block a user