You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/01/12 14:31:28 UTC

[GitHub] csantanapr closed pull request #115: URL parsing problem in database connection

csantanapr closed pull request #115: URL parsing problem in database connection
URL: https://github.com/apache/incubator-openwhisk-package-alarms/pull/115
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/provider/app.js b/provider/app.js
index 9ba5f98..e46ac71 100755
--- a/provider/app.js
+++ b/provider/app.js
@@ -46,7 +46,12 @@ function createDatabase() {
     var method = 'createDatabase';
     logger.info(method, 'creating the trigger database');
 
-    var nano = require('nano')(dbProtocol + '://' + dbUsername + ':' + dbPassword + '@' + dbHost);
+    var nano = require('nano')({
+        url: dbProtocol + "://" + dbHost,
+        requestDefaults: {
+            auth: {user: dbUsername, pass: dbPassword}
+        }
+    });
 
     if (nano !== null) {
         return new Promise(function (resolve, reject) {


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services