@cocreate/file-server 1.0.51 → 1.0.53

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 CHANGED
@@ -1,3 +1,19 @@
1
+ ## [1.0.53](https://github.com/CoCreate-app/CoCreate-file-server/compare/v1.0.52...v1.0.53) (2023-04-11)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * domains renamd to hosts ([8d19734](https://github.com/CoCreate-app/CoCreate-file-server/commit/8d197343a5daa9039f00f69e4a0a78e8a9925f59))
7
+ * if !organization_id query platform org by domain to find id ([c849c7d](https://github.com/CoCreate-app/CoCreate-file-server/commit/c849c7dc2e4c7533550389a589f650077fd9da96))
8
+ * renamed domans to hosts ([57c06c3](https://github.com/CoCreate-app/CoCreate-file-server/commit/57c06c32a5b38c1006ad1e85648164ce3568ac63))
9
+
10
+ ## [1.0.52](https://github.com/CoCreate-app/CoCreate-file-server/compare/v1.0.51...v1.0.52) (2023-02-01)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * bump dependencies ([5e236cc](https://github.com/CoCreate-app/CoCreate-file-server/commit/5e236cc703b7aae02b8267d4789ef887ae7806bf))
16
+
1
17
  ## [1.0.51](https://github.com/CoCreate-app/CoCreate-file-server/compare/v1.0.50...v1.0.51) (2023-01-31)
2
18
 
3
19
 
@@ -12,7 +12,7 @@ module.exports = {
12
12
  "name": "index.html",
13
13
  "path": "/docs/file-server/index.html",
14
14
  "src": "{{./docs/index.html}}",
15
- "domains": [
15
+ "hosts": [
16
16
  "cocreate.app",
17
17
  "general.cocreate.app"
18
18
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/file-server",
3
- "version": "1.0.51",
3
+ "version": "1.0.53",
4
4
  "description": "A simple file-server component in vanilla javascript. Easily configured using HTML5 data-attributes and/or JavaScript API.",
5
5
  "keywords": [
6
6
  "file-server",
@@ -60,8 +60,8 @@
60
60
  "webpack-log": "^3.0.1"
61
61
  },
62
62
  "dependencies": {
63
- "@cocreate/docs": "^1.5.12",
64
- "@cocreate/hosting": "^1.7.12",
63
+ "@cocreate/docs": "^1.5.13",
64
+ "@cocreate/hosting": "^1.7.13",
65
65
  "express": "^4.18.2"
66
66
  }
67
67
  }
package/src/index.js CHANGED
@@ -26,13 +26,13 @@ class CoCreateFileSystem {
26
26
  collection: 'organizations',
27
27
  filter: {
28
28
  query: [
29
- {name: "domains", value: [hostname], operator: "$in"}
29
+ {name: "hosts", value: [hostname], operator: "$in"}
30
30
  ]
31
- }
32
-
31
+ },
32
+ organization_id: process.env.organization_id
33
33
  })
34
34
  if (!organization || !organization.document || !organization.document[0])
35
- return res.send('Organization cannot be found using the domain: ' + hostname + ' in platformDB: ' + process.env.organization_id);
35
+ return res.send('Organization cannot be found using the host: ' + hostname + ' in platformDB: ' + process.env.organization_id);
36
36
 
37
37
  organization_id = organization.document[0]._id
38
38
  }
@@ -55,7 +55,7 @@ class CoCreateFileSystem {
55
55
  collection: 'files',
56
56
  filter: {
57
57
  query: [
58
- {name: "domains", value: [hostname, '*'], operator: "$in"},
58
+ {name: "hosts", value: [hostname, '*'], operator: "$in"},
59
59
  {name: "path", value: url, operator: "$eq"}
60
60
  ]
61
61
  },