Skip to content

Commit

Permalink
feat: query wildcard pathname
Browse files Browse the repository at this point in the history
  • Loading branch information
frankpagan committed Jan 6, 2024
1 parent 7964778 commit bdd4e99
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,9 @@ class CoCreateFileSystem {
array: 'files',
$filter: {
query: [
{ key: "host", value: [hostname, '*'], operator: "$elemMatch" },
// { key: "host", value: [hostname, '*'], operator: "$in" },
{ key: "pathname", value: pathname, operator: "$eq" },
// { key: "pathname", value: wildcard, operator: "$eq", logicalOperator: "or" }
{ key: "host", value: [hostname, '*'], operator: "$in" },
{ key: "pathname", value: pathname, operator: "$or" },
{ key: "pathname", value: wildcard, operator: "$or" }
],
limit: 1
},
Expand All @@ -92,7 +91,7 @@ class CoCreateFileSystem {

if (organization.host) {
let host = organization.host
for (let i = 0; i < host; i++) {
for (let i = 0; i < host.length; i++) {
if (host[i].name === hostname) {
if (host[i].storage)
data.storage = host[i].storage
Expand Down

0 comments on commit bdd4e99

Please sign in to comment.