1
0
Fork 0
mirror of synced 2024-07-14 18:55:45 +12:00

Fix return code

This commit is contained in:
Adria Navarro 2023-07-24 15:11:57 +02:00
parent 1760980aad
commit 7d84deea1a

View file

@ -164,13 +164,13 @@ function getSortOptions(
| undefined {
const { sort_column, sort_order, sort_type } = ctx.query
if (Array.isArray(sort_column)) {
ctx.throw(404, "sort_column cannot be an array")
ctx.throw(400, "sort_column cannot be an array")
}
if (Array.isArray(sort_order)) {
ctx.throw(404, "sort_order cannot be an array")
ctx.throw(400, "sort_order cannot be an array")
}
if (Array.isArray(sort_type)) {
ctx.throw(404, "sort_type cannot be an array")
ctx.throw(400, "sort_type cannot be an array")
}
if (sort_column) {