chore: fix
This commit is contained in:
@@ -352,7 +352,14 @@ func StartDelivery(c *gin.Context) {
|
||||
if clientUsername, _ := command["username"].(string); clientUsername != "" {
|
||||
var msg string
|
||||
etaMinutes := 0
|
||||
if req.Latitude != 0 && req.Longitude != 0 {
|
||||
if etaData, err := database.GetCommandETA(commandID); err == nil {
|
||||
if v, ok := etaData["total_eta_minutes"]; ok {
|
||||
if n, err2 := strconv.Atoi(v); err2 == nil && n > 0 {
|
||||
etaMinutes = n
|
||||
}
|
||||
}
|
||||
}
|
||||
if etaMinutes == 0 && req.Latitude != 0 && req.Longitude != 0 {
|
||||
destLat, _ := command["dest_latitude"].(float64)
|
||||
destLon, _ := command["dest_longitude"].(float64)
|
||||
if destLat != 0 && destLon != 0 {
|
||||
|
||||
Reference in New Issue
Block a user