Finish refactoring auth slice, fixed several bugs

This commit is contained in:
Alex Holliday
2024-08-17 20:23:34 -07:00
parent 46bd317760
commit 6d99002fd1
6 changed files with 59 additions and 22 deletions
+1 -1
View File
@@ -294,7 +294,7 @@ const getMonitorById = async (monitorId) => {
*/
const getMonitorsByUserId = async (req, res) => {
try {
let { limit, type, status, sortOrder, normalize } = req.query;
let { limit, type, status, sortOrder, normalize } = req.query || {};
const monitorQuery = { userId: req.params.userId };
if (type !== undefined) {