You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2018/10/19 09:46:03 UTC

[GitHub] garrensmith closed pull request #1143: Fix fetchDatabaseInfo() to account for url interceptors

garrensmith closed pull request #1143: Fix fetchDatabaseInfo() to account for url interceptors
URL: https://github.com/apache/couchdb-fauxton/pull/1143
 
 
   

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/app/addons/documents/partition-key/api.js b/app/addons/documents/partition-key/api.js
index 720d69f45..1cbb9bff1 100644
--- a/app/addons/documents/partition-key/api.js
+++ b/app/addons/documents/partition-key/api.js
@@ -11,10 +11,12 @@
 // the License.
 
 import '@webcomponents/url';
+import FauxtonAPI from '../../../core/api';
 import {get} from '../../../core/ajax';
 import Helpers from "../../../helpers";
 
 export const fetchDatabaseInfo = (databaseName) => {
-  const url = Helpers.getServerUrl("/" + encodeURIComponent(databaseName));
+  const base = FauxtonAPI.urls('databaseBaseURL', 'server', encodeURIComponent(databaseName));
+  const url = Helpers.getServerUrl(base);
   return get(url);
 };
diff --git a/app/addons/fauxton/notifications/__tests__/components.test.js b/app/addons/fauxton/notifications/__tests__/components.test.js
index a12b15a6b..dc59ef473 100644
--- a/app/addons/fauxton/notifications/__tests__/components.test.js
+++ b/app/addons/fauxton/notifications/__tests__/components.test.js
@@ -25,7 +25,7 @@ describe('Notification', () => {
   it('startHide is only called after visible time is out', (done) => {
     const spy = sinon.spy();
     const component = mount(<Notification
-      notificationId={'some id'}
+      notificationId={123}
       isHiding={false}
       key={11}
       msg={'a msg'}


 

----------------------------------------------------------------
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