]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-11369 SONAR-11370 SONAR-11371 Remove mocking of WS
authorPascal Mugnier <pascal.mugnier@sonarsource.com>
Tue, 23 Oct 2018 07:46:09 +0000 (09:46 +0200)
committerSonarTech <sonartech@sonarsource.com>
Thu, 25 Oct 2018 18:21:02 +0000 (20:21 +0200)
server/sonar-web/src/main/js/api/security-reports.ts

index 74006076097c3fe384505110001e513c8c04b17f..2747ea7536ffd2765d29ea71178cfc19e0e5d671 100644 (file)
@@ -27,15 +27,5 @@ export function getSecurityHotspots(data: {
   includeDistribution?: boolean;
   branch?: string;
 }): Promise<{ categories: Array<SecurityHotspot> }> {
-  return getJSON('/api/security_reports/show', data)
-    .then(data => {
-      /* MOCK, must be removed after backend implementation */
-      data.categories = data.categories.map((v: SecurityHotspot, index: number) => {
-        v.activeRules = index;
-        v.totalRules = 200;
-        return v;
-      });
-      return data;
-    })
-    .catch(throwGlobalError);
+  return getJSON('/api/security_reports/show', data).catch(throwGlobalError);
 }