Merge pull request #340 from bluewave-labs/fix/delete-auth

Fix read error in getMonitorsByUserId
This commit is contained in:
Alexander Holliday authored and GitHub committed 2024-07-15 17:09:26 -07:00
commit 6b794f2435
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(