SONAR-11369 SONAR-11370 SONAR-11371 Remove mocking of WS

This commit is contained in:
Pascal Mugnier 2018-10-23 09:46:09 +02:00 committed by SonarTech
parent a8634266cf
commit 15fa6622e9

View 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);
}