mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-01-18 07:39:54 -06:00
add two mising date clauses to details query
This commit is contained in:
@@ -322,7 +322,7 @@ const getUptimeDetailsById = async (req) => {
|
||||
|
||||
const { dateRange, normalize } = req.query;
|
||||
const dates = getDateRange(dateRange);
|
||||
|
||||
console.log(dates);
|
||||
const formatLookup = {
|
||||
day: "%Y-%m-%d-%H",
|
||||
week: "%Y-%m-%d-%H",
|
||||
@@ -447,6 +447,7 @@ const getUptimeDetailsById = async (req) => {
|
||||
{
|
||||
$match: {
|
||||
status: true,
|
||||
createdAt: { $gte: dates.start, $lte: dates.end },
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -491,6 +492,7 @@ const getUptimeDetailsById = async (req) => {
|
||||
{
|
||||
$match: {
|
||||
status: false,
|
||||
createdAt: { $gte: dates.start, $lte: dates.end },
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user