@cocreate/file-server 1.0.6 → 1.0.8

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,18 @@
1
+ ## [1.0.8](https://github.com/CoCreate-app/CoCreate-file-server/compare/v1.0.7...v1.0.8) (2022-12-04)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * || !organization.document ([d462728](https://github.com/CoCreate-app/CoCreate-file-server/commit/d462728e319d6af3d87487f75b2b12ef6a495255))
7
+ * bump dependencies ([9c53845](https://github.com/CoCreate-app/CoCreate-file-server/commit/9c5384510a632fa53a7e569779cfdef2ef51aef2))
8
+
9
+ ## [1.0.7](https://github.com/CoCreate-app/CoCreate-file-server/compare/v1.0.6...v1.0.7) (2022-12-04)
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * replaced substr with substring ([aa015ae](https://github.com/CoCreate-app/CoCreate-file-server/commit/aa015ae7366ff8a26c6a9d54cbea004d994f03a9))
15
+
1
16
  ## [1.0.6](https://github.com/CoCreate-app/CoCreate-file-server/compare/v1.0.5...v1.0.6) (2022-12-04)
2
17
 
3
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/file-server",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
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",
@@ -61,8 +61,8 @@
61
61
  "webpack-log": "^3.0.1"
62
62
  },
63
63
  "dependencies": {
64
- "@cocreate/docs": "^1.2.26",
65
- "@cocreate/hosting": "^1.2.22",
64
+ "@cocreate/docs": "^1.4.13",
65
+ "@cocreate/hosting": "^1.6.11",
66
66
  "@cocreate/server-side-render": "^1.1.20",
67
67
  "express": "^4.18.2"
68
68
  }
package/src/index.js CHANGED
@@ -31,7 +31,7 @@ class CoCreateFileSystem {
31
31
  }
32
32
 
33
33
  })
34
- if (!organization || !organization.document[0])
34
+ if (!organization || !organization.document || !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
@@ -49,9 +49,8 @@ class CoCreateFileSystem {
49
49
  }
50
50
  }
51
51
 
52
- url = url.startsWith('/ws') ? url.substr(3) : url; // dev
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: {