chore: refacto
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user