]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-7286 Use api/favorites/search in the UI 1477/head
authorTeryk Bellahsene <teryk.bellahsene@sonarsource.com>
Mon, 19 Dec 2016 17:03:10 +0000 (18:03 +0100)
committerTeryk Bellahsene <teryk.bellahsene@sonarsource.com>
Tue, 20 Dec 2016 09:16:40 +0000 (10:16 +0100)
server/sonar-web/src/main/js/api/favorites.js
server/sonar-web/src/main/js/app/components/nav/global/SearchView.js

index 2226739945706e556494455242646b7ce112f179..b45afe5e3b7e062284a6a01bcb949f773470761b 100644 (file)
@@ -21,7 +21,7 @@
 import { post, getJSON } from '../helpers/request';
 
 export const getFavorites = (): Promise<Object> => (
-    getJSON('/api/favourites')
+    getJSON('/api/favorites/search')
 );
 
 export function addFavorite (component: string) {
index 9edb27a8ff2aafd2efaf75d51570215d2645175f..db363edcdc28b9b34b93fb1038fe7fddbc6b0376 100644 (file)
@@ -162,7 +162,7 @@ export default Marionette.LayoutView.extend({
 
   fetchFavorite (): Promise<*> {
     return getFavorites().then(r => {
-      this.favorite = r.map(f => {
+      this.favorite = r.favorites.map(f => {
         const isFile = ['FIL', 'UTS'].indexOf(f.qualifier) !== -1;
         return {
           url: window.baseUrl + '/dashboard/index?id=' + encodeURIComponent(f.key) + window.dashboardParameters(true),