parent
559842d2a6
commit
c930d87900
|
@ -67,21 +67,17 @@
|
|||
headers: { Authorization: "Bearer " + $apikey },
|
||||
data: { card, station: JSON.parse($stationinfo).id },
|
||||
})
|
||||
.then(function (response) {
|
||||
console.log(response.data);
|
||||
// ------------------------
|
||||
console.log(card);
|
||||
lastscan_totaldistance = "?m";
|
||||
let time = new Date();
|
||||
.then((response) => {
|
||||
console.log(response.data.runner);
|
||||
lastscan_totaldistance = response.data.runner.distance + "m";
|
||||
const time = new Date();
|
||||
const hours = (time.getHours() + "").padStart(2, "0");
|
||||
const minutes = (time.getMinutes() + "").padStart(2, "0");
|
||||
const seconds = (time.getSeconds() + "").padStart(2, "0");
|
||||
lastscan_time = hours + ":" + minutes + ":" + seconds;
|
||||
lastscan_laptime = response.data.lapTime + "s";
|
||||
// ------------------------
|
||||
})
|
||||
.catch(function (e) {
|
||||
console.log(e.response);
|
||||
.catch((e) => {
|
||||
lastscan_error = e.response.data.message;
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue