diff --git a/handler.go b/handler.go index b1dfd69..1418aa6 100644 --- a/handler.go +++ b/handler.go @@ -1158,9 +1158,7 @@ func SearchAllIndices(w http.ResponseWriter, r *http.Request) { for _, hit := range searchResp.Hits { indexed := hit.(map[string]interface{}) - stuffType := indexed["stuff_type"].(struct { - NameId string `json:"name_id"` - }).NameId + stuffType := indexed["stuff_type"].(map[string]interface{})["name_id"].(string) isItem := strings.HasPrefix(stuffType, "items-") ankamaId := int(indexed["id"].(float64)) diff --git a/main.go b/main.go index 218939c..476d4d4 100644 --- a/main.go +++ b/main.go @@ -21,7 +21,7 @@ import ( var ( DoduapiMajor = 1 // Major version also used for prefixing API routes. - DoduapiVersion = fmt.Sprintf("v%d.0.0-rc.1", DoduapiMajor) // change with every release + DoduapiVersion = fmt.Sprintf("v%d.0.0-rc.4", DoduapiMajor) // change with every release DoduapiShort = "doduapi - Open Dofus Encyclopedia API" DoduapiLong = "" DoduapiVersionHelp = DoduapiShort + "\n" + DoduapiVersion + "\nhttps://github.com/dofusdude/doduapi"