Skip to content

Commit a8114de

Browse files
committed
fix: renamed db to storage
1 parent b748914 commit a8114de

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,15 @@
100100
data.organization_id = await this.getOrganizationId()
101101

102102
if (data.database || data.collection) {
103-
if (!data.db)
104-
data['db'] = ['indexeddb', 'mongodb']
103+
if (!data.storage)
104+
data['storage'] = ['indexeddb', 'mongodb']
105105
if (!data.database)
106106
data['database'] = data.organization_id || this.socket.config.organization_id
107107
if (!data.user_id)
108108
data['user_id'] = this.socket.config.user_id
109109
}
110110

111-
if (isBrowser && indexeddb.status && data['db'].includes('indexeddb')) {
111+
if (isBrowser && indexeddb.status && data['storage'].includes('indexeddb')) {
112112
indexeddb[action](data).then((response) => {
113113
if (!action.includes("read")) {
114114
if (!data.broadcastBrowser && data.broadcastBrowser != 'false')
@@ -450,7 +450,7 @@
450450
let storedDoc = request.result
451451
let storedDocCompare, docCompare
452452
let Doc = { ...items[i] }
453-
delete items[i].db
453+
delete items[i].storage
454454
delete items[i].database
455455
delete items[i].collection
456456

@@ -654,7 +654,7 @@
654654
host: 'host',
655655
organization_id: 'organization_id',
656656
key: 'key',
657-
db: 'db',
657+
db: 'storage',
658658
database: 'database',
659659
collection: 'collection',
660660
document_id: 'document_id',

0 commit comments

Comments
 (0)