adjust 422 messages

This commit is contained in:
jomo 2015-05-06 22:13:28 +02:00
parent 00f6c28cfc
commit 6273e3bcc8
5 changed files with 6 additions and 6 deletions

View File

@ -45,7 +45,7 @@ module.exports = function(req, callback) {
} else if (!helpers.id_valid(userId)) { } else if (!helpers.id_valid(userId)) {
callback({ callback({
status: -2, status: -2,
body: "Invalid userid" body: "Invalid UserID"
}); });
return; return;
} }

View File

@ -11,7 +11,7 @@ module.exports = function(req, callback) {
if (!helpers.id_valid(userId)) { if (!helpers.id_valid(userId)) {
callback({ callback({
status: -2, status: -2,
body: "Invalid userid" body: "Invalid UserID"
}); });
return; return;
} }

View File

@ -59,13 +59,13 @@ module.exports = function(req, callback) {
if (scale < config.min_scale || scale > config.max_scale) { if (scale < config.min_scale || scale > config.max_scale) {
callback({ callback({
status: -2, status: -2,
body: "422 Invalid Scale" body: "Invalid Scale"
}); });
return; return;
} else if (!helpers.id_valid(userId)) { } else if (!helpers.id_valid(userId)) {
callback({ callback({
status: -2, status: -2,
body: "422 Invalid ID" body: "Invalid UserID"
}); });
return; return;
} }

View File

@ -43,7 +43,7 @@ module.exports = function(req, callback) {
if (!helpers.id_valid(userId)) { if (!helpers.id_valid(userId)) {
callback({ callback({
status: -2, status: -2,
body: "Invalid userid" body: "Invalid UserID"
}); });
return; return;
} }

View File

@ -664,7 +664,7 @@ describe("Crafatar", function() {
}); });
}); });
// testing all paths for invalid userid // testing all paths for Invalid UserID
var locations = ["avatars", "skins", "capes", "renders/body", "renders/head"]; var locations = ["avatars", "skins", "capes", "renders/body", "renders/head"];
for (var l in locations) { for (var l in locations) {
var location = locations[l]; var location = locations[l];