@hlfan commented on this pull request.
> @@ -99,22 +99,18 @@
language: I18n.currentLocale()
}
})
- };
- return $.ajax({
- url: OSM.FOSSGIS_VALHALLA_URL,
- data,
- dataType: "json",
- success: function ({ trip }) {
- if (trip.status === 0) {
- callback(false, _processDirections(trip.legs));
- } else {
- callback(true);
+ });
+ return fetch(OSM.FOSSGIS_VALHALLA_URL + "?" + query)
+ .then(response => response.json())
+ .then(({ trip }) => {
+ if (trip.status !== 0) {
Made this change to all error callbacks.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5642#discussion_r1948540836
You are receiving this because you are subscribed to this thread.
Message ID:
<openstreetmap/openstreetmap-website/pull/5642/review/2604921...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev