missing updates #5

Merged
mats merged 77 commits from refactor/http-proxy into main 2025-10-14 23:12:06 +02:00

View File

@@ -30,9 +30,13 @@ func AddItem(g *CartGrain, m *messages.AddItem) error {
// Fast path: merge with existing item having same SKU // Fast path: merge with existing item having same SKU
if existing, found := g.FindItemWithSku(m.Sku); found { if existing, found := g.FindItemWithSku(m.Sku); found {
if existing.StoreId == m.StoreId {
existing.Quantity += int(m.Quantity) existing.Quantity += int(m.Quantity)
existing.Stock = StockStatus(m.Stock)
existing.StoreId = m.StoreId
return nil return nil
} }
}
g.mu.Lock() g.mu.Lock()
defer g.mu.Unlock() defer g.mu.Unlock()