return a numbered list of vouchers

This commit is contained in:
Alfred Kamanda 2024-09-25 16:06:06 +03:00
parent 0e376e0d9e
commit 221db4e998
Signed by: Alfred-mk
GPG Key ID: 7EA3D01708908703

View File

@ -281,7 +281,12 @@ func (h *Handlers) GetVoucherList(ctx context.Context,sym string,input []byte) (
"VSGAQ", "VSGAQ",
"QPWIQQ", "QPWIQQ",
} }
res.Content = strings.Join(vouchers,"\n")
var numberedVouchers []string
for i, voucher := range vouchers {
numberedVouchers = append(numberedVouchers, fmt.Sprintf("%d:%s", i+1, voucher))
}
res.Content = strings.Join(numberedVouchers,"\n")
return res,nil return res,nil
} }