We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 71a766c commit 9bcc6aeCopy full SHA for 9bcc6ae
lib/global_api/skins/skin_uploader.ex
@@ -83,8 +83,8 @@ defmodule GlobalApi.SkinUploader do
83
texture_data = body["data"]["texture"]
84
85
texture_id = texture_data["url"]
86
- # http://textures.minecraft.net/texture/ = 38 chars long
87
- texture_id = String.slice(texture_id, 38, String.length(texture_id) - 38)
+ # can vary now between http and https, so we just grab the last section
+ texture_id = String.split(texture_id, "/", trim: true) |> List.last()
88
89
skin_value = texture_data["value"]
90
skin_signature = texture_data["signature"]
0 commit comments