Skip to content

Commit

Permalink
test api
Browse files Browse the repository at this point in the history
  • Loading branch information
andreyfoggy committed Apr 1, 2020
1 parent c56eca6 commit 7b9f627
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/services/http.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ export class HttpService {
}

getCasesData() {
return this.http.get('/regions')
return this.http.get('https://cdn.pravda.com/cdn/covid-19/ukraine.json')
.pipe(map((res: any) => {
console.log(res);
const regions = res.regions.regions;
const kyivRegion = regions[regions.findIndex(region => region.name === 'kiev')];
const kyivCity = regions[regions.findIndex(region => region.name === 'kievcity')];
Expand Down

0 comments on commit 7b9f627

Please sign in to comment.