aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeryk Bellahsene <teryk.bellahsene@sonarsource.com>2016-12-19 18:03:10 +0100
committerTeryk Bellahsene <teryk.bellahsene@sonarsource.com>2016-12-20 10:16:40 +0100
commitde2c0d073bba8df274a7c86c14ba64fdb0cafe05 (patch)
treeda30d5109068dcc35ef03da71f008d54428f7340
parent785a3106418f3f32402e3fa0e89f2ef3ebe6b254 (diff)
downloadsonarqube-de2c0d073bba8df274a7c86c14ba64fdb0cafe05.tar.gz
sonarqube-de2c0d073bba8df274a7c86c14ba64fdb0cafe05.zip
SONAR-7286 Use api/favorites/search in the UI
-rw-r--r--server/sonar-web/src/main/js/api/favorites.js2
-rw-r--r--server/sonar-web/src/main/js/app/components/nav/global/SearchView.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/api/favorites.js b/server/sonar-web/src/main/js/api/favorites.js
index 22267399457..b45afe5e3b7 100644
--- a/server/sonar-web/src/main/js/api/favorites.js
+++ b/server/sonar-web/src/main/js/api/favorites.js
@@ -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) {
diff --git a/server/sonar-web/src/main/js/app/components/nav/global/SearchView.js b/server/sonar-web/src/main/js/app/components/nav/global/SearchView.js
index 9edb27a8ff2..db363edcdc2 100644
--- a/server/sonar-web/src/main/js/app/components/nav/global/SearchView.js
+++ b/server/sonar-web/src/main/js/app/components/nav/global/SearchView.js
@@ -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),