@cocreate/mongodb 1.6.1 → 1.6.2

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.2](https://github.com/CoCreate-app/CoCreate-mongodb/compare/v1.6.1...v1.6.2) (2023-08-18)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * type updated to object ([75313f5](https://github.com/CoCreate-app/CoCreate-mongodb/commit/75313f5c97cc16a7dca993127f4abb6b119fcd3c))
7
+
1
8
  ## [1.6.1](https://github.com/CoCreate-app/CoCreate-mongodb/compare/v1.6.0...v1.6.1) (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.1",
3
+ "version": "1.6.2",
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
@@ -245,28 +245,28 @@ function array(action, data) {
245
245
 
246
246
 
247
247
  function createObject(data) {
248
- return document('createObject', data)
248
+ return object('createObject', data)
249
249
  }
250
250
 
251
251
  function readObject(data) {
252
- return document('readObject', data)
252
+ return object('readObject', data)
253
253
  }
254
254
 
255
255
  function updateObject(data) {
256
- return document('updateObject', data)
256
+ return object('updateObject', data)
257
257
  }
258
258
 
259
259
  function deleteObject(data) {
260
- return document('deleteObject', data)
260
+ return object('deleteObject', data)
261
261
  }
262
262
 
263
- function document(action, data) {
263
+ function object(action, data) {
264
264
  return new Promise(async (resolve, reject) => {
265
265
  try {
266
266
  const client = await dbClient(data)
267
267
  if (!client) return
268
268
 
269
- let type = 'document'
269
+ let type = 'object'
270
270
  let documents = [];
271
271
 
272
272
  if (data.request)