Index: database/drizzle/queries/builds.ts
===================================================================
--- database/drizzle/queries/builds.ts	(revision 82aa6ae699fa11a88a3aa636a5ea3e4a4a41d0a0)
+++ database/drizzle/queries/builds.ts	(revision 98543934547eec4612872caf60e2c3b4464ff5e9)
@@ -108,5 +108,5 @@
 export async function getApprovedBuilds(db: Database, limit?: number, sort?: string, q?: string) {
     let queryConditions = [eq(buildsTable.isApproved, true)];
-    let sortConditions = [];
+    let sortCondition:any;
 
     if (q) {
@@ -118,32 +118,20 @@
     switch(sort) {
         case 'price_asc':
-            sortConditions.push(
-                asc(buildsTable.totalPrice)
-            );
+            sortCondition = asc(buildsTable.totalPrice)
             break;
         case 'price_desc':
-            sortConditions.push(
-                desc(buildsTable.totalPrice)
-            );
+            sortCondition = desc(buildsTable.totalPrice)
             break;
         case 'rating_desc':
-            sortConditions.push(
-                desc(sql<number>`COALESCE(AVG(${ratingBuildsTable.value}::float),0)`)
-            );
+            sortCondition = desc(sql<number>`COALESCE(AVG(${ratingBuildsTable.value}::float),0)`)
             break;
         case 'oldest':
-            sortConditions.push(
-                asc(buildsTable.createdAt)
-            );
+            sortCondition = asc(buildsTable.createdAt)
             break;
         case 'newest':
-            sortConditions.push(
-                desc(buildsTable.createdAt)
-            );
+            sortCondition = desc(buildsTable.createdAt)
             break;
         default:
-            sortConditions.push(
-                desc(buildsTable.createdAt)
-            );
+            sortCondition = desc(buildsTable.createdAt)
             break;
         }
@@ -176,5 +164,5 @@
         )
         .orderBy(
-            ...sortConditions
+            sortCondition
         )
         .limit(limit || 100); // 100 placeholder
