Fix read error in getMonitorsByUserId

This commit is contained in:
Alex Holliday committed 2024-07-15 17:03:43 -07:00
1 parent 0f955e53f3
commit 6bf5776e1b
1 file changed
+1 -1
+1 -1
View File
@@ -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(