add description all the way
Some checks failed
Build and Publish / Metadata (push) Successful in 11s
Build and Publish / BuildAndDeployAmd64 (push) Has been cancelled
Build and Publish / BuildAndDeployArm64 (push) Has started running

This commit is contained in:
matst80
2025-10-18 15:50:38 +02:00
parent 662b381a34
commit 0c127e9d38
4 changed files with 29 additions and 13 deletions

View File

@@ -15,9 +15,10 @@ type Rule struct {
}
type Voucher struct {
Code string `json:"code"`
Value int64 `json:"value"`
Rules string `json:"rules"`
Code string `json:"code"`
Value int64 `json:"value"`
Rules string `json:"rules"`
Description string `json:"description,omitempty"`
}
type Service struct {
@@ -40,8 +41,9 @@ func (s *Service) GetVoucher(code string) (*messages.AddVoucher, error) {
}
return &messages.AddVoucher{
Code: code,
Value: v.Value,
Code: code,
Value: v.Value,
Description: v.Description,
VoucherRules: []string{
v.Rules,
},