Fix read error in getMonitorsByUserId
This commit is contained in:
1 parent
0f955e53f3
commit
6bf5776e1b
1 file changed
+1
-1
@@ -293,7 +293,7 @@ const getMonitorById = async (req, res) => {
|
||||
*/
|
||||
const getMonitorsByUserId = async (req, res) => {
|
||||
try {
|
||||
const limit = req.query.limit;
|
||||
const limit = req.query ? req.query.limit : undefined;
|
||||
const monitors = await Monitor.find({ userId: req.params.userId });
|
||||
// Map each monitor to include its associated checks
|
||||
const monitorsWithChecks = await Promise.all(
|
||||
|
||||
Reference in new issue
Block a user