remove redundant checks and console.log
This commit is contained in:
1 parent
53fb79bbfb
commit
abdd51802a
1 file changed
+1
-6
@@ -406,7 +406,7 @@ const getMonitorsByTeamId = async (req, res) => {
|
|||||||
filter,
|
filter,
|
||||||
field,
|
field,
|
||||||
order,
|
order,
|
||||||
} = req.query || {};
|
} = req.query;
|
||||||
|
|
||||||
const monitorQuery = { teamId: req.params.teamId };
|
const monitorQuery = { teamId: req.params.teamId };
|
||||||
|
|
||||||
@@ -441,10 +441,6 @@ const getMonitorsByTeamId = async (req, res) => {
|
|||||||
// Map each monitor to include its associated checks
|
// Map each monitor to include its associated checks
|
||||||
const monitorsWithChecks = await Promise.all(
|
const monitorsWithChecks = await Promise.all(
|
||||||
monitors.map(async (monitor) => {
|
monitors.map(async (monitor) => {
|
||||||
if (status !== undefined) {
|
|
||||||
checksQuery.status = status;
|
|
||||||
}
|
|
||||||
|
|
||||||
let model = CHECK_MODEL_LOOKUP[monitor.type];
|
let model = CHECK_MODEL_LOOKUP[monitor.type];
|
||||||
|
|
||||||
// Checks are order newest -> oldest
|
// Checks are order newest -> oldest
|
||||||
@@ -486,7 +482,6 @@ const createMonitor = async (req, res) => {
|
|||||||
// Remove notifications fom monitor as they aren't needed here
|
// Remove notifications fom monitor as they aren't needed here
|
||||||
monitor.notifications = undefined;
|
monitor.notifications = undefined;
|
||||||
await monitor.save();
|
await monitor.save();
|
||||||
console.log(monitor);
|
|
||||||
return monitor;
|
return monitor;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
error.service = SERVICE_NAME;
|
error.service = SERVICE_NAME;
|
||||||
|
|||||||
Reference in new issue
Block a user