Fix incorrect response schema
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is passing Details

This commit is contained in:
Luca 2023-03-06 00:26:42 +01:00
parent 8e9691943a
commit ab9447591b
1 changed files with 4 additions and 2 deletions

View File

@ -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) {