mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-23 15:49:10 +00:00
fix bug with auto conversion of array to object for monitor criteria
This commit is contained in:
parent
0041a4c85c
commit
fcc67c9aa8
@ -136,7 +136,12 @@ router.get('/monitors', isAuthorizedProbe, async function(req, res) {
|
||||
global.io.emit(`updateProbe-${projectId}`, probe);
|
||||
}
|
||||
}
|
||||
return sendListResponse(req, res, monitors, monitors.length);
|
||||
return sendListResponse(
|
||||
req,
|
||||
res,
|
||||
JSON.stringify(monitors),
|
||||
monitors.length
|
||||
);
|
||||
} catch (error) {
|
||||
return sendErrorResponse(req, res, error);
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ module.exports = {
|
||||
runJob: async function() {
|
||||
try {
|
||||
let monitors = await getApi('probe/monitors');
|
||||
monitors = monitors.data;
|
||||
monitors = JSON.parse(monitors.data); // parse the stringified data
|
||||
await Promise.all(
|
||||
monitors.map(monitor => {
|
||||
if (monitor.type === 'api') {
|
||||
|
Loading…
Reference in New Issue
Block a user