mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-02-06 00:58:45 -06:00
undo changes
This commit is contained in:
@@ -47,7 +47,7 @@ You can see the designs [here](https://www.figma.com/design/RPSfaw66HjzSwzntKcgD
|
||||
- <code>POST</code> [/api/v1/auth/recovery/reset](#post-auth-recovery-reset-id)
|
||||
###### Monitors
|
||||
- <code>GET</code> [/api/v1/monitors](#get-monitors)
|
||||
- <code>GET</code> [/api/v1/monitor/{id}?limit](#get-monitor-id)
|
||||
- <code>GET</code> [/api/v1/monitor/{id}](#get-monitor-id)
|
||||
- <code>GET</code> [/api/v1/monitors/user/{userId}](#get-monitors-user-userid)
|
||||
- <code>POST</code> [/api/v1/monitors](#post-monitors)
|
||||
- <code>POST</code> [/api/v1/monitors/delete/{monitorId}](#post-monitors-del-id)
|
||||
@@ -678,7 +678,7 @@ curl --request GET \
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary id='get-monitor-id'><code>GET</code> <b>/api/v1/monitor/{id}?limit</b></summary>
|
||||
<summary id='get-monitor-id'><code>GET</code> <b>/api/v1/monitor/{id}</b></summary>
|
||||
|
||||
###### Method/Headers
|
||||
|
||||
@@ -696,7 +696,7 @@ curl --request GET \
|
||||
|
||||
```
|
||||
curl --request GET \
|
||||
--url http://localhost:5000/api/v1/monitors/664d070786e62625ac612ca1?limit=25 \
|
||||
--url http://localhost:5000/api/v1/monitors/664d070786e62625ac612ca1 \
|
||||
--header '<bearer_token>' \
|
||||
```
|
||||
|
||||
|
||||
@@ -42,13 +42,8 @@ const getChecks = async (req, res, next) => {
|
||||
return;
|
||||
}
|
||||
|
||||
let limit = null;
|
||||
|
||||
try {
|
||||
if (req.query && req.query.limit) {
|
||||
limit = parseInt(req.query.limit);
|
||||
}
|
||||
const checks = await req.db.getChecks(req.params.monitorId, limit);
|
||||
const checks = await req.db.getChecks(req.params.monitorId);
|
||||
return res
|
||||
.status(200)
|
||||
.json({ success: true, msg: successMessages.CHECK_GET, data: checks });
|
||||
|
||||
@@ -10,7 +10,7 @@ router.post(
|
||||
);
|
||||
|
||||
router.get(
|
||||
"/:monitorId?limit",
|
||||
"/:monitorId",
|
||||
verifyOwnership(Monitor, "monitorId"),
|
||||
checkController.getChecks
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user