@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 +8 -0
- package/CoCreate.config.js +1 -1
- package/demo/CoCreate-createUser.html +1 -1
- package/demo/index.html +1 -1
- package/demo/industries/industries.html +1 -1
- package/demo/industries/industry-datatable.html +1 -1
- package/demo/industries/industry-documents-datatable.1.html +1 -1
- package/package.json +1 -1
- package/src/client.js +4 -5
- package/src/server.js +2 -2
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
|
|
package/CoCreate.config.js
CHANGED
package/demo/index.html
CHANGED
package/package.json
CHANGED
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.
|
|
26
|
+
const room = config.organization_id;
|
|
28
27
|
|
|
29
28
|
crud.send('createOrgNew', {
|
|
30
29
|
apiKey: config.apiKey,
|
|
31
|
-
organization_id: config.
|
|
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.
|
|
54
|
+
const room = config.organization_id;
|
|
56
55
|
|
|
57
56
|
crud.send('createOrg', {
|
|
58
57
|
apiKey: config.apiKey,
|
|
59
|
-
organization_id: config.
|
|
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 {
|
|
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
|
|
27
|
+
"_id": new ObjectId(newOrg_id)
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
collection.find(query).toArray(function(error, result) {
|