This commit is contained in:
2022-01-03 19:06:11 +01:00
parent b5bd672f44
commit be889b8100

View File

@@ -28,9 +28,7 @@ function requestTmdbIdController(req, res) {
let mediaFunction = undefined; let mediaFunction = undefined;
if (id === undefined || type === undefined) { if (id === undefined || type === undefined) {
res res.status(422).send({
.status(422)
.send({
success: false, success: false,
message: "'Missing parameteres: 'id' and/or 'type'" message: "'Missing parameteres: 'id' and/or 'type'"
}); });
@@ -41,9 +39,7 @@ function requestTmdbIdController(req, res) {
} else if (type === "show") { } else if (type === "show") {
mediaFunction = tmdbShowInfo; mediaFunction = tmdbShowInfo;
} else { } else {
res res.status(422).send({
.status(422)
.send({
success: false, success: false,
message: 'Incorrect type. Allowed types: "movie" or "show"' message: 'Incorrect type. Allowed types: "movie" or "show"'
}); });