test
All checks were successful
Build and Publish / Metadata (push) Successful in 9s
Build and Publish / BuildAndDeployAmd64 (push) Successful in 1m3s
Build and Publish / BuildAndDeployArm64 (push) Successful in 4m54s

This commit is contained in:
matst80
2025-10-18 14:42:52 +02:00
parent dc352e3b74
commit 2ce45656d9

View File

@@ -15,9 +15,9 @@ type Rule struct {
} }
type Voucher struct { type Voucher struct {
Code string `json:"code"` Code string `json:"code"`
Value int64 `json:"discount"` Value int64 `json:"value"`
rules []*messages.VoucherRule `json:"rules"` rules string `json:"rules"`
} }
type Service struct { type Service struct {
@@ -40,9 +40,16 @@ func (s *Service) GetVoucher(code string) (*messages.AddVoucher, error) {
} }
return &messages.AddVoucher{ return &messages.AddVoucher{
Code: code, Code: code,
Value: v.Value, Value: v.Value,
VoucherRules: v.rules, VoucherRules: []*messages.VoucherRule{
{
Condition: v.rules,
Type: "",
Description: "",
Action: "",
},
},
}, nil }, nil
} }