fix: operator bug

pull/2040/head
minkik 2023-05-18 10:35:24 +09:00 committed by Joseph Lee
parent ed29fc08e8
commit 555e5afd15
7 changed files with 9 additions and 7 deletions

View File

@ -86,7 +86,7 @@ async function relationalQuery(
], ],
}, },
{ {
lte: [ $lte: [
'$created_at', '$created_at',
{ {
$dateFromString: { $dateFromString: {

View File

@ -114,7 +114,7 @@ async function relationalQuery(
], ],
}, },
{ {
lte: [ $lte: [
'$created_at', '$created_at',
{ {
$dateFromString: { $dateFromString: {

View File

@ -30,7 +30,9 @@ async function relationalQuery(data: {
const { websiteId, eventId, eventData } = data; const { websiteId, eventId, eventData } = data;
const jsonKeys = flattenJSON(eventData); const jsonKeys = flattenJSON(eventData);
if (jsonKeys.length == 0) {
return Promise.resolve({ count: 0 });
}
//id, websiteEventId, eventStringValue //id, websiteEventId, eventStringValue
const flattendData = jsonKeys.map(a => ({ const flattendData = jsonKeys.map(a => ({
id: uuid(), id: uuid(),

View File

@ -90,7 +90,7 @@ async function relationalQuery(
], ],
}, },
{ {
lte: [ $lte: [
'$created_at', '$created_at',
{ {
$dateFromString: { $dateFromString: {

View File

@ -105,7 +105,7 @@ async function relationalQuery(
], ],
}, },
{ {
lte: [ $lte: [
'$created_at', '$created_at',
{ {
$dateFromString: { $dateFromString: {

View File

@ -59,7 +59,7 @@ async function relationalQuery(
], ],
}, },
{ {
lte: [ $lte: [
'$created_at', '$created_at',
{ {
$dateFromString: { $dateFromString: {

View File

@ -70,7 +70,7 @@ async function relationalQuery(
], ],
}, },
{ {
lte: [ $lte: [
'$created_at', '$created_at',
{ {
$dateFromString: { $dateFromString: {