Skip to content

Commit d3d43dc

Browse files
committed
fix: update to support new query system
1 parent bc992c1 commit d3d43dc

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/server.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,10 @@ module.exports = async function file(CoCreateConfig, configPath, match) {
127127
method: 'signIn',
128128
array: 'users',
129129
$filter: {
130-
query: [
131-
{ key: 'email', value: config.email, operator: '$eq' },
132-
{ key: 'password', value: config.password, operator: '$eq' }
133-
]
130+
query: {
131+
email: config.email,
132+
password: config.password
133+
}
134134
},
135135
...config
136136
}
@@ -292,7 +292,9 @@ module.exports = async function file(CoCreateConfig, configPath, match) {
292292
if (skip !== 'directory') {
293293
if (!newObject.object._id)
294294
newObject.$filter = {
295-
query: [{ key: 'pathname', value: pathname, operator: '$eq' }]
295+
query: {
296+
pathname
297+
}
296298
}
297299

298300
response = await runStore(newObject);
@@ -404,7 +406,9 @@ module.exports = async function file(CoCreateConfig, configPath, match) {
404406
let data = { array, object }
405407
if (!object._id && object.pathname)
406408
data.$filter = {
407-
query: [{ key: 'pathname', value: object.pathname, operator: '$or' }]
409+
query: {
410+
$or: [{ pathname: object.pathname }]
411+
}
408412
}
409413

410414
if (match.length && isMatch)

0 commit comments

Comments
 (0)