Revision 51590
Added by Myrto Koukouli almost 6 years ago
piwik.service.ts | ||
---|---|---|
31 | 31 |
.catch(this.handleError); |
32 | 32 |
} |
33 | 33 |
|
34 |
enableMetricsForRepository(piwik: PiwikInfo) { |
|
35 |
let url = `${this.apiUrl}enableMetricsForRepository`; |
|
34 |
enableMetricsForRepository(repoName: string, repoWebsite: string, piwik: PiwikInfo) {
|
|
35 |
let url = `${this.apiUrl}enableMetricsForRepository?officialName=${encodeURIComponent(repoName)}&repoWebsite=${encodeURIComponent(repoWebsite)}`;
|
|
36 | 36 |
console.log(`knocking on: ${url}`); |
37 | 37 |
console.log(`sending ${JSON.stringify(piwik)}`); |
38 | 38 |
httpOptions.withCredentials = true; |
39 |
return this.http.post(url,piwik,httpOptions)
|
|
39 |
return this.http.post(url,JSON.stringify(piwik),httpOptions)
|
|
40 | 40 |
.map( res => res.status.toString() ) |
41 | 41 |
.catch(this.handleError); |
42 | 42 |
} |
... | ... | |
66 | 66 |
} |
67 | 67 |
|
68 | 68 |
|
69 |
markPiwikSiteAsValidated(repositoryId: string) { |
|
69 |
markPiwikSiteAsValidated (repositoryId: string) {
|
|
70 | 70 |
let url = `${this.apiUrl}markPiwikSiteAsValidated/${repositoryId}`; |
71 | 71 |
console.log(`knocking on: ${url}`); |
72 | 72 |
httpOptions.withCredentials = true; |
Also available in: Unified diff
corrected enableMetrics method