Added new endpoints to readme, added cURL and Sample respones to existing endpoint docs, fixed minor bugs discovered during documentation
This commit is contained in:
1 parent
412a14306e
commit
f4b0034281
4 files changed
+273
-28
No files matched your search
@@ -41,8 +41,7 @@ const getMonitorById = async (req, res) => {
|
||||
}
|
||||
|
||||
try {
|
||||
const monitorId = req.params.monitorId;
|
||||
const monitor = await req.db.getMonitorById(monitorId);
|
||||
const monitor = await req.db.getMonitorById(req, res);
|
||||
return res.json({ success: true, msg: "Monitor found", data: monitor });
|
||||
} catch (error) {
|
||||
logger.error(error.message, { service: "monitor" });
|
||||
@@ -68,7 +67,7 @@ const getMonitorsByUserId = async (req, res) => {
|
||||
|
||||
try {
|
||||
const userId = req.params.userId;
|
||||
const monitors = await req.db.getMonitorsByUserId(userId);
|
||||
const monitors = await req.db.getMonitorsByUserId(req, res);
|
||||
logger.info(`Monitors for user ${userId} found`, {
|
||||
service: "monitor",
|
||||
userId: userId,
|
||||
|
||||
Reference in new issue
Block a user