mirror of
https://github.com/elyby/chrly.git
synced 2024-11-27 01:01:59 +05:30
Исправлена ошибка, когда к скинам моянга приклеивался наш домен
This commit is contained in:
parent
64bf7deb79
commit
c03021403a
@ -16,7 +16,6 @@ func Skin(w http.ResponseWriter, r *http.Request) {
|
|||||||
rec, err := data.FindRecord(username)
|
rec, err := data.FindRecord(username)
|
||||||
if (err != nil) {
|
if (err != nil) {
|
||||||
http.Redirect(w, r, "http://skins.minecraft.net/MinecraftSkins/" + username + ".png", 301)
|
http.Redirect(w, r, "http://skins.minecraft.net/MinecraftSkins/" + username + ".png", 301)
|
||||||
log.Println("Cannot get skin for username " + username)
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,11 +19,13 @@ func Textures(w http.ResponseWriter, r *http.Request) {
|
|||||||
if (err != nil || rec.SkinId == 0) {
|
if (err != nil || rec.SkinId == 0) {
|
||||||
rec.Url = "http://skins.minecraft.net/MinecraftSkins/" + username + ".png"
|
rec.Url = "http://skins.minecraft.net/MinecraftSkins/" + username + ".png"
|
||||||
rec.Hash = string(tools.BuildNonElyTexturesHash(username))
|
rec.Hash = string(tools.BuildNonElyTexturesHash(username))
|
||||||
|
} else {
|
||||||
|
rec.Url = tools.BuildElyUrl(rec.Url)
|
||||||
}
|
}
|
||||||
|
|
||||||
textures := data.TexturesResponse{
|
textures := data.TexturesResponse{
|
||||||
Skin: &data.Skin{
|
Skin: &data.Skin{
|
||||||
Url: tools.BuildElyUrl(rec.Url),
|
Url: rec.Url,
|
||||||
Hash: rec.Hash,
|
Hash: rec.Hash,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user