Updated getAllMonitors to only return active monitors

This commit is contained in:
Alex Holliday
2024-05-21 11:28:36 -07:00
parent e7cd1ae6ab
commit face3339cd
+1 -1
View File
@@ -61,7 +61,7 @@ const getUserByEmail = async (req, res) => {
*/
const getAllMonitors = async (req, res) => {
try {
const monitors = await Monitor.find();
const monitors = await Monitor.find({ isActive: true });
return monitors;
} catch (error) {
throw error;