mirror of
https://github.com/Terreii/andromeda-viewer.git
synced 2026-08-14 00:57:49 +00:00
14 lines
288 B
JavaScript
14 lines
288 B
JavaScript
'use strict'
|
|
|
|
const nano = require('nano')(process.env.COUCH_URL || 'http://localhost:5984')
|
|
|
|
exports.nano = nano
|
|
|
|
exports.usersDB = nano.db.use('_users')
|
|
|
|
exports.getUserDbName = getUserDbName
|
|
|
|
function getUserDbName (userId) {
|
|
return 'userdb-' + Buffer.from(userId).toString('hex')
|
|
}
|