|
|
@ -1,9 +1,9 @@ |
|
|
const CouchDb = require(".") |
|
|
const CouchDb = require(".") |
|
|
|
|
|
|
|
|
module.exports = async clientId => { |
|
|
module.exports = async (config, clientId) => { |
|
|
await CouchDb.db.create(clientId) |
|
|
await CouchDb.db.create(`client-${clientId}`) |
|
|
|
|
|
|
|
|
const db = CouchDb.db.use(clientId) |
|
|
const db = CouchDb(config).db.use(`client-${clientId}`) |
|
|
|
|
|
|
|
|
await db.insert( |
|
|
await db.insert( |
|
|
{ |
|
|
{ |
|
|
|