@cocreate/crud-server 1.4.4 → 1.5.0

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.5.0](https://github.com/CoCreate-app/CoCreate-crud-server/compare/v1.4.4...v1.5.0) (2022-05-14)
2
+
3
+
4
+ ### Features
5
+
6
+ * function readDocumentList has been renamed to readDocuments ([3081581](https://github.com/CoCreate-app/CoCreate-crud-server/commit/308158148dccc82411e625d8270e5dd107b7df94))
7
+
1
8
  ## [1.4.4](https://github.com/CoCreate-app/CoCreate-crud-server/compare/v1.4.3...v1.4.4) (2022-05-13)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/crud-server",
3
- "version": "1.4.4",
3
+ "version": "1.5.0",
4
4
  "description": "CoCreate-crud-server",
5
5
  "keywords": [
6
6
  "cocreate-crud",
package/src/list.js CHANGED
@@ -8,7 +8,7 @@ class CoCreateList {
8
8
  }
9
9
 
10
10
  init() {
11
- this.wsManager.on('readDocumentList', (socket, data, socketInfo) => this.readDocumentList(socket, data, socketInfo));
11
+ this.wsManager.on('readDocuments', (socket, data, socketInfo) => this.readDocuments(socket, data, socketInfo));
12
12
  this.wsManager.on('readCollections', (socket, data, socketInfo) => this.readCollections(socket, data, socketInfo));
13
13
  }
14
14
 
@@ -46,7 +46,7 @@ class CoCreateList {
46
46
  data: [] // array
47
47
  }
48
48
  **/
49
- async readDocumentList(socket, req_data, socketInfo) {
49
+ async readDocuments(socket, req_data, socketInfo) {
50
50
  function sleep(ms) {
51
51
  return new Promise((resolve) => {
52
52
  setTimeout(resolve, ms);
@@ -113,14 +113,14 @@ class CoCreateList {
113
113
 
114
114
  result_data = result;
115
115
  }
116
- self.wsManager.send(socket, 'readDocumentList', { ...req_data, data: result_data, operator: {...operator, total: total}}, req_data['organization_id'], socketInfo);
116
+ self.wsManager.send(socket, 'readDocuments', { ...req_data, data: result_data, operator: {...operator, total: total}}, req_data['organization_id'], socketInfo);
117
117
  } else {
118
118
  console.log(error)
119
119
  self.wsManager.send(socket, 'ServerError', error, null, socketInfo);
120
120
  }
121
121
  })
122
122
  } catch (error) {
123
- console.log('readDocumentList error', error);
123
+ console.log('readDocuments error', error);
124
124
  this.wsManager.send(socket, 'ServerError', 'error', null, socketInfo);
125
125
  }
126
126
  }