Revision 53127
Added by Myrto Koukouli almost 6 years ago
statistics.service.ts | ||
---|---|---|
8 | 8 |
import 'rxjs/add/operator/map'; |
9 | 9 |
import { ReportResponseWrapper } from '../domain/usageStatsClasses'; |
10 | 10 |
import {HttpClient, HttpHeaders} from "@angular/common/http"; |
11 |
import { UsageStatsSummary } from '../domain/typeScriptClasses'; |
|
11 | 12 |
|
12 | 13 |
|
13 | 14 |
const headerOptions = { |
... | ... | |
22 | 23 |
constructor(private httpClient: HttpClient) { } |
23 | 24 |
|
24 | 25 |
|
25 |
getStatisticsNumbers(): Observable<Map<string,string>> {
|
|
26 |
getStatisticsNumbers(): Observable<UsageStatsSummary> {
|
|
26 | 27 |
let url = `${this.apiUrl}getStatistics`; |
27 | 28 |
console.log(`knocking on: ${url}`); |
28 | 29 |
|
29 |
return this.httpClient.get<Map<string,string>>(url, headerOptions);
|
|
30 |
return this.httpClient.get<UsageStatsSummary>(url, headerOptions);
|
|
30 | 31 |
} |
31 | 32 |
|
32 | 33 |
|
Also available in: Unified diff
ready for release