From e73e677d8d9bc5f24294329cd13e7deefde478d6 Mon Sep 17 00:00:00 2001 From: Jake Date: Mon, 2 Feb 2015 17:29:07 -0600 Subject: [PATCH] Resolve mismatched URL #s, closes #85, gg @jomo --- modules/networking.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/networking.js b/modules/networking.js index 7365364..7037b1d 100644 --- a/modules/networking.js +++ b/modules/networking.js @@ -86,6 +86,7 @@ exp.get_from = function(rid, url, callback) { // the skin url is taken from the HTTP redirect // type reference is above exp.get_username_url = function(rid, name, type, callback) { + console.log(mojang_urls[type]) exp.get_from(rid, mojang_urls[type] + name + ".png", function(body, response, err) { if (!err) { callback(err, response ? (response.statusCode === 404 ? null : response.headers.location) : null); @@ -99,9 +100,9 @@ exp.get_username_url = function(rid, name, type, callback) { // +type+ specifies which to retrieve exp.get_uuid_url = function(profile, type, callback) { var url = null; - if (type === 1) { + if (type === 0) { url = exp.extract_skin_url(profile); - } else if (type === 2) { + } else if (type === 1) { url = exp.extract_cape_url(profile); } callback(url || null);