feature/backoffice #6

Merged
mats merged 24 commits from feature/backoffice into main 2025-10-16 09:46:07 +02:00
Showing only changes of commit 9dc5bab7c5 - Show all commits

View File

@@ -41,15 +41,12 @@ func listCartFiles(dir string) ([]CartFileInfo, error) {
continue continue
} }
name := e.Name() name := e.Name()
var id uint64 var id int64
var parseErr error var parseErr error
parts := strings.Split(name, ".") parts := strings.Split(name, ".")
if len(parts) == 2 && parts[1] == "events.log" { if len(parts) > 1 && parts[1] == "events" {
idStr := parts[0] idStr := parts[0]
id, parseErr = strconv.ParseUint(idStr, 10, 64) id, parseErr = strconv.ParseInt(idStr, 10, 64)
} else if len(parts) == 3 && parts[1] == "events" && parts[2] == "log" {
idStr := parts[0]
id, parseErr = strconv.ParseUint(idStr, 10, 64)
} else { } else {
continue continue
} }
@@ -62,7 +59,7 @@ func listCartFiles(dir string) ([]CartFileInfo, error) {
continue continue
} }
out = append(out, CartFileInfo{ out = append(out, CartFileInfo{
ID: id, ID: uint64(id),
CartId: cart.CartId(id), CartId: cart.CartId(id),
Path: p, Path: p,
Size: info.Size(), Size: info.Size(),