Count monitors by type
This commit is contained in:
1 parent
5609e54127
commit
8ea0ef77e9
1 file changed
+4
-1
@@ -305,7 +305,10 @@ const getMonitorsByTeamId = async (req, res) => {
|
|||||||
let { limit, type, status, sortOrder, normalize, page, rowsPerPage } =
|
let { limit, type, status, sortOrder, normalize, page, rowsPerPage } =
|
||||||
req.query || {};
|
req.query || {};
|
||||||
const monitorQuery = { teamId: req.params.teamId };
|
const monitorQuery = { teamId: req.params.teamId };
|
||||||
const monitorsCount = await Monitor.countDocuments(monitorQuery);
|
const monitorsCount = await Monitor.countDocuments({
|
||||||
|
teamId: req.params.teamId,
|
||||||
|
type,
|
||||||
|
});
|
||||||
|
|
||||||
// Pagination
|
// Pagination
|
||||||
let skip = 0;
|
let skip = 0;
|
||||||
|
|||||||
Reference in new issue
Block a user