limiting getChecks to the last 25 checks
This commit is contained in:
1 parent
5c9b111707
commit
6589d0ef06
3 files changed
+14
-5
No files matched your search
@@ -416,7 +416,7 @@ const createCheck = async (checkData) => {
|
||||
|
||||
const getChecks = async (monitorId) => {
|
||||
try {
|
||||
const checks = await Check.find({ monitorId });
|
||||
const checks = await Check.find({ monitorId }).sort({ createdAt: -1 }).limit(25);
|
||||
return checks;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
|
||||
Reference in new issue
Block a user