Skip to content

Commit f472264

Browse files
committed
Bug fix
1 parent f5c1c7f commit f472264

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

client/src/app/_services/shelters.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export class SheltersService {
2424

2525
public getLatLng(): Observable<any> {
2626
return this.http.get(
27-
'http://ip-api.com/json/'
27+
'https://ipapi.co/json'
2828
);
2929
}
3030

client/src/app/home/home.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export class HomeComponent implements AfterViewInit {
4343
this.sheltersService.getLatLng()
4444
.subscribe(
4545
(res) => {
46-
this.sheltersService.getAllShelters(res.lat, res.lon, 50)
46+
this.sheltersService.getAllShelters(res.latitude, res.longitude, 50)
4747
.subscribe(
4848
(res) => {
4949
var i = 0;

client/src/app/shelters/shelters.component.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,16 @@ export class SheltersComponent implements OnInit {
3636
this.shelterService.getLatLng()
3737
.subscribe(
3838
(res) => {
39-
this.shelterService.getAllShelters(res.lat, res.lon, this.radius)
39+
this.shelterService.getAllShelters(res.latitude, res.longitude, this.radius)
4040
.subscribe(
4141
(res) => {
4242
res.sort(this.shelterSortFunc);
4343
this.shelters = res;
4444
},
4545
(err) => this.alertService.error(err)
4646
);
47-
}
47+
},
48+
this.alertService.error
4849
);
4950

5051
this.shelterService.getZipcodeStatus()
@@ -90,7 +91,7 @@ export class SheltersComponent implements OnInit {
9091
this.shelterService.getLatLng()
9192
.subscribe(
9293
(res) => {
93-
this.shelterService.getAllShelters(res.lat, res.lon, this.radius)
94+
this.shelterService.getAllShelters(res.latitude, res.longitude, this.radius)
9495
.subscribe(
9596
(res) => {
9697
for (let i = 0; i < res.length; i++) {
@@ -106,7 +107,8 @@ export class SheltersComponent implements OnInit {
106107
},
107108
(err) => this.alertService.error(err)
108109
);
109-
}
110+
},
111+
this.alertService.error
110112
);
111113
}
112114

0 commit comments

Comments
 (0)