aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/api/components.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js/api/components.ts')
-rw-r--r--server/sonar-web/src/main/js/api/components.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/sonar-web/src/main/js/api/components.ts b/server/sonar-web/src/main/js/api/components.ts
index fd46c34d559..361713b815d 100644
--- a/server/sonar-web/src/main/js/api/components.ts
+++ b/server/sonar-web/src/main/js/api/components.ts
@@ -243,11 +243,11 @@ export function getSources(
return getJSON('/api/sources/lines', data).then(r => r.sources);
}
-export function getDuplications(component: string): Promise<any> {
- return getJSON('/api/duplications/show', { key: component });
+export function getDuplications(component: string, branch?: string): Promise<any> {
+ return getJSON('/api/duplications/show', { key: component, branch });
}
-export function getTests(component: string, line: number | string): Promise<any> {
- const data = { sourceFileKey: component, sourceFileLineNumber: line };
+export function getTests(component: string, line: number | string, branch?: string): Promise<any> {
+ const data = { sourceFileKey: component, sourceFileLineNumber: line, branch };
return getJSON('/api/tests/list', data).then(r => r.tests);
}