mirror of
https://github.com/azures04/crafatar.git
synced 2026-03-22 07:51:17 +01:00
Remove debug/formatting
This commit is contained in:
parent
c428499959
commit
5a258bb651
@ -53,8 +53,9 @@ exp.get_from_options = function(url, options, callback) {
|
|||||||
retryDelay: 2000,
|
retryDelay: 2000,
|
||||||
retryStrategy: request.RetryStrategies.NetworkError
|
retryStrategy: request.RetryStrategies.NetworkError
|
||||||
}, function(error, response, body) {
|
}, function(error, response, body) {
|
||||||
|
// 200 or 301 depending on content type
|
||||||
if (!error && (response.statusCode === 200 || response.statusCode === 301)) {
|
if (!error && (response.statusCode === 200 || response.statusCode === 301)) {
|
||||||
// skin_url received successfully
|
// response received successfully
|
||||||
logging.log(url + " url received");
|
logging.log(url + " url received");
|
||||||
callback(body, response, null);
|
callback(body, response, null);
|
||||||
} else if (error) {
|
} else if (error) {
|
||||||
@ -119,7 +120,7 @@ exp.get_profile = function(uuid, callback) {
|
|||||||
if (!uuid) {
|
if (!uuid) {
|
||||||
callback(null, null);
|
callback(null, null);
|
||||||
} else {
|
} 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));
|
callback(err !== null ? err : null, (body !== null ? JSON.parse(body) : null));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -275,7 +275,6 @@ describe("Crafatar", function() {
|
|||||||
if (id_type == "uuid") {
|
if (id_type == "uuid") {
|
||||||
it("uuid should be rate limited", function(done) {
|
it("uuid should be rate limited", function(done) {
|
||||||
networking.get_profile(id, function(err, profile) {
|
networking.get_profile(id, function(err, profile) {
|
||||||
console.log("THIS THING:: " + err)
|
|
||||||
assert.strictEqual(profile.error, "TooManyRequestsException");
|
assert.strictEqual(profile.error, "TooManyRequestsException");
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user