mirror of
https://github.com/azures04/crafatar.git
synced 2026-03-22 07:51:17 +01:00
adjust 422 messages
This commit is contained in:
parent
00f6c28cfc
commit
6273e3bcc8
@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user