Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
fix(shared): pouchdb auth - add skip_setup flag
Browse files Browse the repository at this point in the history
fix #2256
  • Loading branch information
blestab committed Aug 17, 2020
1 parent 10569ce commit a8d34e1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/shared/config/pouchdb.ts
Expand Up @@ -18,14 +18,14 @@ let serverDb
let localDb

if (process.env.NODE_ENV === 'test') {
serverDb = new PouchDB('hospitalrun', { adapter: 'memory' })
localDb = new PouchDB('local_hospitalrun', { adapter: 'memory' })
serverDb = new PouchDB('hospitalrun', { skip_setup: true, adapter: 'memory' })
localDb = new PouchDB('local_hospitalrun', { skip_setup: true, adapter: 'memory' })
} else {
serverDb = new PouchDB(`${process.env.REACT_APP_HOSPITALRUN_API}/hospitalrun`, {
skip_setup: true,
})

localDb = new PouchDB('local_hospitalrun')
localDb = new PouchDB('local_hospitalrun', { skip_setup: true })
localDb
.sync(serverDb, { live: true, retry: true })
.on('change', (info) => {
Expand Down

0 comments on commit a8d34e1

Please sign in to comment.