Merge branch 'master' of github.com:crafatar/crafatar

This commit is contained in:
jomo 2015-03-22 03:09:12 +01:00
commit 2cb197a717
5 changed files with 8 additions and 8 deletions

View File

@ -69,7 +69,7 @@ module.exports = function(req, res) {
logging.debug(rid, "matches:", matches);
sendimage(rid, http_status, status, image);
} else {
handle_default(rid, 404, status, userId);
handle_default(rid, 200, status, userId);
}
});
} catch(e) {

View File

@ -85,7 +85,7 @@ module.exports = function(req, res) {
sendimage(rid, http_status, status, image);
} else {
logging.log(rid, "image not found, using default.");
handle_default(rid, 404, status, userId);
handle_default(rid, 200, status, userId);
}
});
} catch(e) {

View File

@ -43,7 +43,7 @@ module.exports = function(req, res) {
logging.debug(rid, "matches:", matches);
sendimage(rid, http_status, image);
} else {
handle_default(rid, 404, userId);
handle_default(rid, 200, userId);
}
});
} catch(e) {

View File

@ -311,9 +311,9 @@ describe("Crafatar", function() {
for (l in locations) {
var location = locations[l];
(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) {
assert.equal(404, res.statusCode);
assert.equal(200, res.statusCode);
done();
});
});

View File

@ -65,7 +65,7 @@ block content
| The standard value is calculated based on the UUID (even = alex, odd = steve).<br>
| Usernames always default to steve.
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
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>
| Usernames always default to steve.
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
a(href="/skins/0?default=steve") steve
| ,
@ -229,7 +229,7 @@ block content
| Replace
mark.green userid
| 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
| #{domain}/capes/
mark.green userid