Skip to content

Commit

Permalink
🚑 Fix location checkin 404 (#2726)
Browse files Browse the repository at this point in the history
  • Loading branch information
HerrLevin authored Jul 1, 2024
1 parent 6af8570 commit 3627def
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion resources/vue/components/StationAutocomplete.vue
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,17 @@ export default {
navigator.geolocation.getCurrentPosition(
(position) => {
window.location.href = `/trains/nearby?latitude=${position.coords.latitude}&longitude=${position.coords.longitude}`;
fetch(`/api/v1/trains/station/nearby?latitude=${position.coords.latitude}&longitude=${position.coords.longitude}`)
.then((data) => {
if (!data.ok) {
notyf.error(trans("stationboard.position-unavailable"));
this.fetchingGps = false;
}
data.json().then((result) => {
this.setStation(result.data);
this.fetchingGps = false;
});
})
},
() => {
this.fetchingGps = false;
Expand Down

0 comments on commit 3627def

Please sign in to comment.