Jake 10 лет назад
Родитель
Сommit
5a258bb651
2 измененных файлов с 3 добавлено и 3 удалено
  1. 3 2
      modules/networking.js
  2. 0 1
      test/test.js

+ 3 - 2
modules/networking.js

@@ -53,8 +53,9 @@ exp.get_from_options = function(url, options, callback) {
     retryDelay: 2000,
     retryStrategy: request.RetryStrategies.NetworkError
   }, function(error, response, body) {
+    // 200 or 301 depending on content type
     if (!error && (response.statusCode === 200 || response.statusCode === 301)) {
-      // skin_url received successfully
+      // response received successfully
       logging.log(url + " url received");
       callback(body, response, null);
     } else if (error) {
@@ -119,7 +120,7 @@ exp.get_profile = function(uuid, callback) {
   if (!uuid) {
     callback(null, null);
   } else {
-    exp.get_from_options(session_url + uuid, {encoding: "utf8"} ,function(body, response, err) {
+    exp.get_from_options(session_url + uuid, {encoding: "utf8"}, function(body, response, err) {
       callback(err !== null ? err : null, (body !== null ? JSON.parse(body) : null));
     }); 
   }

+ 0 - 1
test/test.js

@@ -275,7 +275,6 @@ describe("Crafatar", function() {
         if (id_type == "uuid") {
           it("uuid should be rate limited", function(done) {
             networking.get_profile(id, function(err, profile) {
-              console.log("THIS THING:: " + err)
               assert.strictEqual(profile.error, "TooManyRequestsException");
               done();
             });