@cocreate/mongodb 1.6.0 → 1.6.1

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.6.1](https://github.com/CoCreate-app/CoCreate-mongodb/compare/v1.6.0...v1.6.1) (2023-08-17)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * typo db.array to db.collection ([1561ab9](https://github.com/CoCreate-app/CoCreate-mongodb/commit/1561ab9ad137dcb52575e804ced3659309701550))
7
+
1
8
  # [1.6.0](https://github.com/CoCreate-app/CoCreate-mongodb/compare/v1.5.0...v1.6.0) (2023-08-17)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/mongodb",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "description": "A simple mongodb component in vanilla javascript. Easily configured using HTML5 data-attributes and/or JavaScript API.",
5
5
  "keywords": [
6
6
  "mongodb",
package/src/index.js CHANGED
@@ -185,7 +185,7 @@ function array(action, data) {
185
185
  [array, value] = array
186
186
  }
187
187
 
188
- const arrayObj = db.array(array);
188
+ const arrayObj = db.collection(array);
189
189
 
190
190
  if (action == 'updateCollection') {
191
191
  arrayObj.rename(value, function (error, result) {
@@ -294,7 +294,7 @@ function document(action, data) {
294
294
  let arraysLength = arrays.length
295
295
  for (let array of arrays) {
296
296
  const db = client.db(database);
297
- const arrayObj = db.array(array);
297
+ const arrayObj = db.collection(array);
298
298
 
299
299
  let { query, sort } = getFilters(data);
300
300
  if (data['organization_id']) {