From 35641e420bd2046028cf8d499b20a0aea80352aa Mon Sep 17 00:00:00 2001 From: maru Date: Thu, 18 Apr 2024 02:11:31 -0400 Subject: [PATCH] Clean up compensation code --- api/savedata/get.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/api/savedata/get.go b/api/savedata/get.go index 6e120ad..0d93e30 100644 --- a/api/savedata/get.go +++ b/api/savedata/get.go @@ -22,9 +22,8 @@ func Get(uuid []byte, datatype, slot int) (any, error) { return nil, fmt.Errorf("failed to fetch compensations: %s", err) } - for k, v := range compensations { - typeKey := strconv.Itoa(k) - system.VoucherCounts[typeKey] += v + for compensationType, amount := range compensations { + system.VoucherCounts[strconv.Itoa(compensationType)] += amount } return system, nil