Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

userDB was changed from property to async function

  • Loading branch information...
commit c214136f81b0e84595303f1724494f35f6833d66 1 parent 406c9b3
@yssk22 authored
Showing with 5 additions and 4 deletions.
  1. +5 −4 lib/db.js
View
9 lib/db.js
@@ -22,10 +22,11 @@ var server = new cradle.Connection({
});
exports.server = server;
-exports.userDB = null;
-server.config(function(err, r){
- exports.userDB = server.database(r.json.couch_httpd_auth.authentication_db);
-});
+exports.userDB = function(callback){
+ server.config(function(err, r){
+ callback && callback(exports.createConnection(r.json.couch_httpd_auth.authentication_db));
+ });
+};
exports.createConnection = function(name, options){
Please sign in to comment.
Something went wrong with that request. Please try again.