aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/api/nav.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js/api/nav.ts')
-rw-r--r--server/sonar-web/src/main/js/api/nav.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/server/sonar-web/src/main/js/api/nav.ts b/server/sonar-web/src/main/js/api/nav.ts
index 3b2046df1c0..0e1983d0527 100644
--- a/server/sonar-web/src/main/js/api/nav.ts
+++ b/server/sonar-web/src/main/js/api/nav.ts
@@ -18,15 +18,16 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { getJSON } from '../helpers/request';
+import throwGlobalError from '../app/utils/throwGlobalError';
export function getGlobalNavigation(): Promise<any> {
return getJSON('/api/navigation/global');
}
-export function getComponentNavigation(componentKey: string): Promise<any> {
- return getJSON('/api/navigation/component', { componentKey });
+export function getComponentNavigation(componentKey: string, branch?: string): Promise<any> {
+ return getJSON('/api/navigation/component', { componentKey, branch }).catch(throwGlobalError);
}
export function getSettingsNavigation(): Promise<any> {
- return getJSON('/api/navigation/settings');
+ return getJSON('/api/navigation/settings').catch(throwGlobalError);
}