@cocreate/api 1.2.31 → 1.2.32

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,10 @@
1
+ ## [1.2.32](https://github.com/CoCreate-app/CoCreate-api/compare/v1.2.31...v1.2.32) (2022-03-06)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * use redocument ot get org if org_id is known ([7ef0d5c](https://github.com/CoCreate-app/CoCreate-api/commit/7ef0d5c3dd1ced316c83173bd3e8a0f02e6949b7))
7
+
1
8
  ## [1.2.31](https://github.com/CoCreate-app/CoCreate-api/compare/v1.2.30...v1.2.31) (2022-02-27)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/api",
3
- "version": "1.2.31",
3
+ "version": "1.2.32",
4
4
  "description": "A simple api helper component in vanilla javascript used by JavaScript developers to create thirdparty api intergrations. CoCreate-api includes the client component and server side for api processing. Thirdparty apis can be accessible using HTML5 attributes and/or JavaScript API. ",
5
5
  "keywords": [
6
6
  "thirdparty-api-intergration",
package/src/server.js CHANGED
@@ -93,22 +93,11 @@ var api = ( ()=> {
93
93
  host: socket_config.host
94
94
  })
95
95
 
96
- // socket.setGlobalScope(socket_config.config.organization_id)
97
- let myOrg = await crud.readDocumentList({
96
+ let myOrg = await crud.readDocument({
98
97
  collection: "organizations",
99
- operator: {
100
- filters: [{
101
- name: '_id',
102
- operator: "$eq",
103
- value: [org["_id"].toString()]
104
- }],
105
- orders: [],
106
- startIndex: 0,
107
- search: { type: 'or', value: []}
108
- },
109
- is_collection: false,
110
- apiKey: org["apiKey"],
111
- organization_id: org["_id"]
98
+ document_id: org["_id"],
99
+ apiKey: org["apiKey"],
100
+ organization_id: org["_id"]
112
101
  });
113
102
  let result = {'row':myOrg,'socket_config':socket_config};
114
103
  return result;