mirror of
https://github.com/azures04/crafatar.git
synced 2026-03-21 23:41:18 +01:00
Merge branch 'master' of github.com:crafatar/crafatar
This commit is contained in:
commit
2cb197a717
@ -69,7 +69,7 @@ module.exports = function(req, res) {
|
|||||||
logging.debug(rid, "matches:", matches);
|
logging.debug(rid, "matches:", matches);
|
||||||
sendimage(rid, http_status, status, image);
|
sendimage(rid, http_status, status, image);
|
||||||
} else {
|
} else {
|
||||||
handle_default(rid, 404, status, userId);
|
handle_default(rid, 200, status, userId);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
|
|||||||
@ -85,7 +85,7 @@ module.exports = function(req, res) {
|
|||||||
sendimage(rid, http_status, status, image);
|
sendimage(rid, http_status, status, image);
|
||||||
} else {
|
} else {
|
||||||
logging.log(rid, "image not found, using default.");
|
logging.log(rid, "image not found, using default.");
|
||||||
handle_default(rid, 404, status, userId);
|
handle_default(rid, 200, status, userId);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
|
|||||||
@ -43,7 +43,7 @@ module.exports = function(req, res) {
|
|||||||
logging.debug(rid, "matches:", matches);
|
logging.debug(rid, "matches:", matches);
|
||||||
sendimage(rid, http_status, image);
|
sendimage(rid, http_status, image);
|
||||||
} else {
|
} else {
|
||||||
handle_default(rid, 404, userId);
|
handle_default(rid, 200, userId);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
|
|||||||
@ -311,9 +311,9 @@ describe("Crafatar", function() {
|
|||||||
for (l in locations) {
|
for (l in locations) {
|
||||||
var location = locations[l];
|
var location = locations[l];
|
||||||
(function(location) {
|
(function(location) {
|
||||||
it("should return a 404 (default steve image " + location + ")", function(done) {
|
it("should return a 200 (default steve image " + location + ")", function(done) {
|
||||||
request.get("http://localhost:3000/" + location + "/invalidjsvns?default=steve", function(error, res, body) {
|
request.get("http://localhost:3000/" + location + "/invalidjsvns?default=steve", function(error, res, body) {
|
||||||
assert.equal(404, res.statusCode);
|
assert.equal(200, res.statusCode);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@ -65,7 +65,7 @@ block content
|
|||||||
| The standard value is calculated based on the UUID (even = alex, odd = steve).<br>
|
| The standard value is calculated based on the UUID (even = alex, odd = steve).<br>
|
||||||
| Usernames always default to steve.
|
| Usernames always default to steve.
|
||||||
td
|
td
|
||||||
| The image to be served when the userid has no skin (404).<br>
|
| The image to be served when the userid has no skin.<br>
|
||||||
| Valid options are
|
| Valid options are
|
||||||
a(href="/avatars/0?default=steve") steve
|
a(href="/avatars/0?default=steve") steve
|
||||||
| ,
|
| ,
|
||||||
@ -198,7 +198,7 @@ block content
|
|||||||
| The standard value is calculated based on the UUID (even = alex, odd = steve).<br>
|
| The standard value is calculated based on the UUID (even = alex, odd = steve).<br>
|
||||||
| Usernames always default to steve.
|
| Usernames always default to steve.
|
||||||
td
|
td
|
||||||
| The image to be served when the userid has no skin (404).<br>
|
| The image to be served when the userid has no skin.<br>
|
||||||
| Valid options are
|
| Valid options are
|
||||||
a(href="/skins/0?default=steve") steve
|
a(href="/skins/0?default=steve") steve
|
||||||
| ,
|
| ,
|
||||||
@ -229,7 +229,7 @@ block content
|
|||||||
| Replace
|
| Replace
|
||||||
mark.green userid
|
mark.green userid
|
||||||
| with a Mojang <b>UUID</b> or <b>username</b> to get the related cape.<br>
|
| with a Mojang <b>UUID</b> or <b>username</b> to get the related cape.<br>
|
||||||
| The user's cape is returned, otherwise a 404 is thrown.<br>
|
| The user's cape is returned, otherwise a 404 is returned.<br>
|
||||||
.code
|
.code
|
||||||
| #{domain}/capes/
|
| #{domain}/capes/
|
||||||
mark.green userid
|
mark.green userid
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user