@cocreate/file-server 1.0.5 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/package.json +1 -1
- package/src/index.js +4 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [1.0.7](https://github.com/CoCreate-app/CoCreate-file-server/compare/v1.0.6...v1.0.7) (2022-12-04)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* replaced substr with substring ([aa015ae](https://github.com/CoCreate-app/CoCreate-file-server/commit/aa015ae7366ff8a26c6a9d54cbea004d994f03a9))
|
|
7
|
+
|
|
8
|
+
## [1.0.6](https://github.com/CoCreate-app/CoCreate-file-server/compare/v1.0.5...v1.0.6) (2022-12-04)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* path operator ([39bffb1](https://github.com/CoCreate-app/CoCreate-file-server/commit/39bffb1bad4e136335dfe051c23eaecd55f203a7))
|
|
14
|
+
|
|
1
15
|
## [1.0.5](https://github.com/CoCreate-app/CoCreate-file-server/compare/v1.0.4...v1.0.5) (2022-12-04)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -33,7 +33,7 @@ class CoCreateFileSystem {
|
|
|
33
33
|
})
|
|
34
34
|
if (!organization || !organization.document[0])
|
|
35
35
|
return res.send('Organization cannot be found using the domain: ' + hostname + ' in platformDB: ' + masterOrg);
|
|
36
|
-
|
|
36
|
+
|
|
37
37
|
organization_id = organization.document[0]._id
|
|
38
38
|
}
|
|
39
39
|
|
|
@@ -49,15 +49,14 @@ class CoCreateFileSystem {
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
url = url.startsWith('/ws') ? url.
|
|
52
|
+
url = url.startsWith('/ws') ? url.substring(3) : url; // dev
|
|
53
53
|
|
|
54
|
-
// fix: '*' causing error 'must be a single String of 12 bytes or a string of 24 hex characters'
|
|
55
54
|
let file = await crud.readDocument({
|
|
56
55
|
collection: 'files',
|
|
57
56
|
filter: {
|
|
58
57
|
query: [
|
|
59
|
-
{name: "domains", value: [hostname, '*'], operator: "$
|
|
60
|
-
{name: "path", value: url, operator: "$
|
|
58
|
+
{name: "domains", value: [hostname, '*'], operator: "$in"},
|
|
59
|
+
{name: "path", value: url, operator: "$eq"}
|
|
61
60
|
]
|
|
62
61
|
},
|
|
63
62
|
organization_id
|