Skip to content

Commit

Permalink
fix: update to support new query system
Browse files Browse the repository at this point in the history
  • Loading branch information
frankpagan committed Jan 13, 2024
1 parent 51a3ba0 commit a5de658
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,10 @@
method: 'object.delete',
array: 'message_log',
$filter: {
query: [
{ key: 'modified.on', value: message.timestamp, operator: '$gt' },
{ key: 'status', value: 'queued', operator: '$eq' }
]
query: {
'modified.on': { $gt: message.timestamp },
status: 'queued'
}
}
}

Expand All @@ -243,9 +243,10 @@
if (Array.isArray(message[type])) {
for (let item of message[type]) {
if (type == 'object') {
Data.$filter.query.push({ key: 'data._id', value: item._id, operator: '$eq' })
Data.$filter.query['data._id'] = item._id
} else if (['database', 'array', 'index',].includes(type)) {
Data.$filter.query.push({ key: 'data.name', value: item.name, operator: '$eq' })
Data.$filter.query['data.name'] = item.name

}
}
// indexeddb.send(Data)
Expand Down Expand Up @@ -292,9 +293,7 @@
method: 'object.delete',
array: 'message_log',
$filter: {
query: [
{ key: 'status', value: 'queued', operator: '$eq' }
]
query: { status: 'queued' }
},
organization_id: config.organization_id

Expand Down

0 comments on commit a5de658

Please sign in to comment.