Updated getAllMonitors to only return active monitors
This commit is contained in:
1 parent
e7cd1ae6ab
commit
face3339cd
1 file changed
+1
-1
@@ -61,7 +61,7 @@ const getUserByEmail = async (req, res) => {
|
|||||||
*/
|
*/
|
||||||
const getAllMonitors = async (req, res) => {
|
const getAllMonitors = async (req, res) => {
|
||||||
try {
|
try {
|
||||||
const monitors = await Monitor.find();
|
const monitors = await Monitor.find({ isActive: true });
|
||||||
return monitors;
|
return monitors;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw error;
|
throw error;
|
||||||
|
|||||||
Reference in new issue
Block a user