From ab9447591b2c5cf31b659f53e07484906c8fd0d2 Mon Sep 17 00:00:00 2001 From: Luca Date: Mon, 6 Mar 2023 00:26:42 +0100 Subject: [PATCH] Fix incorrect response schema --- internal/pretix/order_placed.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/pretix/order_placed.go b/internal/pretix/order_placed.go index 365f23b..77787f2 100644 --- a/internal/pretix/order_placed.go +++ b/internal/pretix/order_placed.go @@ -215,7 +215,9 @@ func (s Server) fetchCategory(organizer, event string, item uint) string { decoder = json.NewDecoder(resp.Body) itemCategory := struct{ - Name string + Name struct{ + German string `json:"de-informal"` + } }{} err = decoder.Decode(&itemCategory) @@ -223,7 +225,7 @@ func (s Server) fetchCategory(organizer, event string, item uint) string { return "" } - return itemCategory.Name + return itemCategory.Name.German } func parsePrice(price string) (euros uint64, cents uint64, err error) {