From 1d17041126e9e2b53ce43f7b7623c6ab1550a092 Mon Sep 17 00:00:00 2001 From: "Visal .In" Date: Tue, 2 Apr 2024 15:23:04 +0700 Subject: [PATCH] hotfix: fixing order by validation --- src/app/api/ops/[database_id]/handle-select-table.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/api/ops/[database_id]/handle-select-table.ts b/src/app/api/ops/[database_id]/handle-select-table.ts index 17983cc9..a524ce62 100644 --- a/src/app/api/ops/[database_id]/handle-select-table.ts +++ b/src/app/api/ops/[database_id]/handle-select-table.ts @@ -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,