@cocreate/organizations 1.2.2 → 1.2.3

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,11 @@
1
+ ## [1.2.3](https://github.com/CoCreate-app/CoCreate-organizations/compare/v1.2.2...v1.2.3) (2022-05-06)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * replace ObjectID with ObjectId due to mongodb depreciation ([675f499](https://github.com/CoCreate-app/CoCreate-organizations/commit/675f49949d338e735e5d6df8a1be01b9b5f71751))
7
+ * update config organization_Id to organization_id ([be77abe](https://github.com/CoCreate-app/CoCreate-organizations/commit/be77abe662b7839f3f97ad1dcc54835d85dc67c1))
8
+
1
9
  ## [1.2.2](https://github.com/CoCreate-app/CoCreate-organizations/compare/v1.2.1...v1.2.2) (2022-03-21)
2
10
 
3
11
 
@@ -1,7 +1,7 @@
1
1
  module.exports = {
2
2
  "config": {
3
3
  "apiKey": "2061acef-0451-4545-f754-60cf8160",
4
- "organization_Id": "5ff747727005da1c272740ab",
4
+ "organization_id": "5ff747727005da1c272740ab",
5
5
  "host": "general.cocreate.app"
6
6
  },
7
7
 
@@ -48,7 +48,7 @@
48
48
  <script>
49
49
  var config = {
50
50
  apiKey: 'c2b08663-06e3-440c-ef6f-13978b42883a',
51
- organization_Id: '5de0387b12e200ea63204d6c'
51
+ organization_id: '5de0387b12e200ea63204d6c'
52
52
  }
53
53
  </script>
54
54
 
package/demo/index.html CHANGED
@@ -98,7 +98,7 @@
98
98
  <script>
99
99
  var config = {
100
100
  apiKey: 'c2b08663-06e3-440c-ef6f-13978b42883a',
101
- organization_Id: '5de0387b12e200ea63204d6c',
101
+ organization_id: '5de0387b12e200ea63204d6c',
102
102
  host: 'ws.cocreate.app'
103
103
  }
104
104
  </script>
@@ -75,7 +75,7 @@
75
75
  var config = {
76
76
  apiKey: '2061acef-0451-4545-f754-60cf8160',
77
77
  securityKey: '073daff2-5142-4402-cf59-48e205ef',
78
- organization_Id: '5ff747727005da1c272740ab'
78
+ organization_id: '5ff747727005da1c272740ab'
79
79
  }
80
80
  </script>
81
81
 
@@ -112,7 +112,7 @@
112
112
  <script>
113
113
  var config = {
114
114
  apiKey: 'c2b08663-06e3-440c-ef6f-13978b42883a',
115
- organization_Id: '5de0387b12e200ea63204d6c'
115
+ organization_id: '5de0387b12e200ea63204d6c'
116
116
  }
117
117
  </script>
118
118
 
@@ -117,7 +117,7 @@
117
117
  <script>
118
118
  var config = {
119
119
  apiKey: 'c2b08663-06e3-440c-ef6f-13978b42883a',
120
- organization_Id: '5de0387b12e200ea63204d6c'
120
+ organization_id: '5de0387b12e200ea63204d6c'
121
121
  }
122
122
  </script>
123
123
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/organizations",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "description": "A simple organizations component in vanilla javascript. Easily configured using HTML5 attributes and/or JavaScript API.",
5
5
  "keywords": [
6
6
  "organizations",
package/src/client.js CHANGED
@@ -3,7 +3,6 @@ import crud from '@cocreate/crud-client';
3
3
  import action from '@cocreate/actions';
4
4
 
5
5
  const CoCreateOrganization = {
6
- // masterDB: '5ae0cfac6fb8c4e656fdaf92', // '5ae0cfac6fb8c4e656fdaf92' /** masterDB **/,
7
6
  init: function() {
8
7
  const self = this;
9
8
  crud.listen('createOrgNew', function(data) {
@@ -24,11 +23,11 @@ const CoCreateOrganization = {
24
23
  if (!form) return;
25
24
  let newOrg_id = form.querySelector("input[collection='organizations'][name='_id']");
26
25
 
27
- const room = config.organization_Id;
26
+ const room = config.organization_id;
28
27
 
29
28
  crud.send('createOrgNew', {
30
29
  apiKey: config.apiKey,
31
- organization_id: config.organization_Id,
30
+ organization_id: config.organization_id,
32
31
  collection: 'organizations',
33
32
  newOrg_id: newOrg_id,
34
33
  }, room);
@@ -52,11 +51,11 @@ const CoCreateOrganization = {
52
51
  }
53
52
  data[name] = value;
54
53
  });
55
- const room = config.organization_Id;
54
+ const room = config.organization_id;
56
55
 
57
56
  crud.send('createOrg', {
58
57
  apiKey: config.apiKey,
59
- organization_id: config.organization_Id,
58
+ organization_id: config.organization_id,
60
59
  // orgDb: newOrg,
61
60
  mdb: '5ae0cfac6fb8c4e656fdaf92',
62
61
  collection: 'organizations',
package/src/server.js CHANGED
@@ -1,4 +1,4 @@
1
- const {ObjectID} = require("mongodb");
1
+ const {ObjectId} = require("mongodb");
2
2
 
3
3
  class CoCreateOrganization {
4
4
  constructor(wsManager, dbClient) {
@@ -24,7 +24,7 @@ class CoCreateOrganization {
24
24
  const db = this.dbClient.db(req_data['organization_id']);
25
25
  const collection = db.collection(req_data["collection"]);
26
26
  const query = {
27
- "_id": new ObjectID(newOrg_id)
27
+ "_id": new ObjectId(newOrg_id)
28
28
  };
29
29
 
30
30
  collection.find(query).toArray(function(error, result) {