Browse Source

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

jomo 10 years ago
parent
commit
2cb197a717
5 changed files with 8 additions and 8 deletions
  1. 1 1
      routes/avatars.js
  2. 1 1
      routes/renders.js
  3. 1 1
      routes/skins.js
  4. 2 2
      test/test.js
  5. 3 3
      views/index.jade

+ 1 - 1
routes/avatars.js

@@ -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) {

+ 1 - 1
routes/renders.js

@@ -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) {

+ 1 - 1
routes/skins.js

@@ -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) {

+ 2 - 2
test/test.js

@@ -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();
           });
         });

+ 3 - 3
views/index.jade

@@ -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