aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/api/nav.ts
diff options
context:
space:
mode:
authorStas Vilchik <stas.vilchik@sonarsource.com>2017-08-17 21:39:59 +0200
committerJanos Gyerik <janos.gyerik@sonarsource.com>2017-09-12 11:34:36 +0200
commitcff416d7f9910c258bc8d7175c08afff96a9eb2a (patch)
tree78500908a2afde31b28ef938d4d61609d448f279 /server/sonar-web/src/main/js/api/nav.ts
parent139467cf51932ba232190f363ad864e60eb3fd4d (diff)
downloadsonarqube-cff416d7f9910c258bc8d7175c08afff96a9eb2a.tar.gz
sonarqube-cff416d7f9910c258bc8d7175c08afff96a9eb2a.zip
SONAR-9702 Build UI for short-lived branches (#2371)
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);
}