js api refactoring

This commit is contained in:
Gwendolyn 2023-12-21 16:46:14 +01:00
parent 511a40fb5a
commit 9d8fbc808f
3 changed files with 20 additions and 33 deletions

View file

@ -260,9 +260,6 @@ c3nav = {
//c3nav.test_location();
},
get_csrf_token: function() {
return document.cookie.match(new RegExp('c3nav_csrftoken=([^;]+)'))[1];
},
test_location: function() {
c3nav_api.get('positioning/locate-test')
.then(data => {
@ -1967,7 +1964,7 @@ c3nav = {
}
};
$(document).ready(() => {
c3nav_api.authenticated().then(c3nav.init);
c3nav.init();
});
function nearby_stations_available() {