chore: refacto

This commit is contained in:
2026-04-22 19:06:35 +02:00
parent 7605fce9f4
commit a276e1126f
7 changed files with 64 additions and 90 deletions
+5 -2
View File
@@ -134,8 +134,11 @@ func (d *Database) CalculateETAForDeliveryman(deliveryman string, destLat, destL
Longitude: destLng,
}
distance := services.CalculateDistance(from, to)
eta := services.CalculateETA(distance)
eta, _, err2 := services.CalculateETAWithTomTom(from, to)
if err2 != nil {
distance := services.CalculateDistance(from, to)
eta = services.CalculateETA(distance)
}
return eta
}