chore: fix bug
Backend - Build & Lint / build (push) Has been cancelled

This commit is contained in:
Nuxgrid
2026-07-11 11:45:13 +02:00
parent f531ddcda8
commit f674b6ef80
29 changed files with 3621 additions and 313 deletions
+8 -1
View File
@@ -163,8 +163,15 @@ func (d *Database) SetCommandETAWithDetails(commandID, totalETA, queuePosition i
arrivalTime := now.Add(time.Duration(totalETA) * time.Minute)
eta := map[string]any{
"command_id": commandID,
"command_id": commandID,
// total_eta_minutes ET eta_minutes doivent tous les deux être présents :
// l'app mobile et le site web lisent eta_minutes (voir
// OrderTrackingScreen.tsx / api.ts), tandis que d'autres lecteurs
// backend (deleviry.go, validation_deleviry.go, geoloca.go) lisent
// total_eta_minutes. Un seul des deux absent reproduit le bug
// "le client ne voit pas le temps".
"total_eta_minutes": totalETA,
"eta_minutes": totalETA,
"queue_position": queuePosition,
"updated_at": now.Unix(),
"arrival_time": arrivalTime.Unix(),