Merge remote-tracking branch 'origin/master'

This commit is contained in:
M_Kececi
2026-03-29 22:41:02 +03:00
parent 96ede55936
commit 05c6103a3a
10 changed files with 629 additions and 92 deletions

View File

@@ -5,8 +5,10 @@ import (
"bssapp-backend/queries"
"context"
"encoding/json"
"fmt"
"log"
"net/http"
"sort"
"time"
)
@@ -79,6 +81,16 @@ func GetOrderInventoryHandler(w http.ResponseWriter, r *http.Request) {
return
}
// Debug: beden/adet özetini tek satırda yazdır (saha doğrulaması için)
if len(list) > 0 {
keys := make([]string, 0, len(list))
for _, it := range list {
keys = append(keys, fmt.Sprintf("%s:%g", it.Beden, it.KullanilabilirAdet))
}
sort.Strings(keys)
log.Printf("🔎 [ORDERINV] beden/qty -> %s", keys)
}
log.Printf("✅ [ORDERINV] %s / %s / %s -> %d kayıt döndü", code, color, color2, len(list))
w.Header().Set("Content-Type", "application/json; charset=utf-8")