Cleanup TODO items

This commit is contained in:
ErickSkrauch
2020-04-20 15:40:20 +03:00
parent 0be85b356b
commit d9fbfe658a
4 changed files with 5 additions and 36 deletions

View File

@@ -208,8 +208,8 @@ func (ctx *Skinsystem) signedTexturesHandler(response http.ResponseWriter, reque
}
responseData.Props = append(responseData.Props, &mojang.Property{
Name: getStringOrDefault(ctx.TexturesExtraParamName, "chrly"), // TODO: extract to the default param value
Value: getStringOrDefault(ctx.TexturesExtraParamValue, "how do you tame a horse in Minecraft?"),
Name: ctx.TexturesExtraParamName,
Value: ctx.TexturesExtraParamValue,
})
responseJson, _ := json.Marshal(responseData)
@@ -220,11 +220,3 @@ func (ctx *Skinsystem) signedTexturesHandler(response http.ResponseWriter, reque
func parseUsername(username string) string {
return strings.TrimSuffix(username, ".png")
}
func getStringOrDefault(value string, def string) string {
if value != "" {
return value
}
return def
}