Skip to content

Commit

Permalink
fix: type updated to object
Browse files Browse the repository at this point in the history
  • Loading branch information
frankpagan committed Aug 18, 2023
1 parent 7ef279c commit 75313f5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,28 +245,28 @@ function array(action, data) {


function createObject(data) {
return document('createObject', data)
return object('createObject', data)
}

function readObject(data) {
return document('readObject', data)
return object('readObject', data)
}

function updateObject(data) {
return document('updateObject', data)
return object('updateObject', data)
}

function deleteObject(data) {
return document('deleteObject', data)
return object('deleteObject', data)
}

function document(action, data) {
function object(action, data) {
return new Promise(async (resolve, reject) => {
try {
const client = await dbClient(data)
if (!client) return

let type = 'document'
let type = 'object'
let documents = [];

if (data.request)
Expand Down

0 comments on commit 75313f5

Please sign in to comment.