1
0
Fork 0

fix(server): do not overlay idx var

This commit is contained in:
Vojtěch Mareš 2024-06-27 09:14:39 +02:00
parent aee7cbc526
commit 36230f02e5
Signed by: vojtech.mares
GPG key ID: C6827B976F17240D

View file

@ -40,8 +40,8 @@ func (h *APIHandlers) ListTrainings(ctx context.Context, req ListTrainingsReques
data := make([]Training, len(trainings))
for idx, t := range trainings {
pricing := make([]TrainingPrice, len(t.Pricing))
for idx, p := range t.Pricing {
pricing[idx] = TrainingPrice{
for pIdx, p := range t.Pricing {
pricing[pIdx] = TrainingPrice{
Amount: p.Amount.String(),
Currency: p.Currency,
Type: TrainingPriceType(p.Type),