chore: build backend
Backend - Build & Lint / build (push) Successful in 41m24s

This commit is contained in:
Xor290
2026-10-02 18:50:56 +02:00
parent 08be8f78a3
commit eeef7e1af0
+7
View File
@@ -175,6 +175,7 @@ func GetDeliveryDetails(c *gin.Context) {
"total_prix": command["total_prix"], "total_prix": command["total_prix"],
"referral_used": command["referral_used"], "referral_used": command["referral_used"],
"created_at": command["created_at"], "created_at": command["created_at"],
"is_new_client": isFirstOrder(command["client_order_number"]),
"client_info": clientInfo, "client_info": clientInfo,
"items": itemsSummary, "items": itemsSummary,
"items_count": len(items), "items_count": len(items),
@@ -625,3 +626,9 @@ func GetMyDeliveryStats(c *gin.Context) {
"today_revenue": todayRow.Revenue, "today_revenue": todayRow.Revenue,
}) })
} }
// isFirstOrder indique si la commande est la toute première du client (client_order_id == 1).
func isFirstOrder(v any) bool {
n, _ := strconv.Atoi(fmt.Sprintf("%v", v))
return n == 1
}