Skip to content

Commit

Permalink
hotfix: fixing order by validation
Browse files Browse the repository at this point in the history
  • Loading branch information
invisal committed Apr 2, 2024
1 parent 6e745bd commit 1d17041
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/api/ops/[database_id]/handle-select-table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const handleSelectTableRequest: DatabaseOperationHandler<

if (body.options.orderBy) {
for (const orderOption of body.options.orderBy) {
if (orderOption.by !== "DESC" && orderOption.by === "ASC") {
if (orderOption.by !== "DESC" && orderOption.by !== "ASC") {
throw new ApiError({
message: "Order by must be DESC or ASC",
status: HttpStatus.FORBIDDEN,
Expand Down

0 comments on commit 1d17041

Please sign in to comment.