Skip to content

Commit

Permalink
refactor(server): order properties by creation date in SQL query
Browse files Browse the repository at this point in the history
  • Loading branch information
csulit committed Oct 25, 2024
1 parent 1929f39 commit dc8c215
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ app.get("/api/properties", async (c: Context) => {
LEFT JOIN Listing_Area ar ON p.listing_area_id = ar.id
WHERE
${sqlWhereClause}
ORDER BY l.id DESC LIMIT $${paramCounter} OFFSET $${paramCounter + 1};
ORDER BY l.created_at DESC LIMIT $${paramCounter} OFFSET $${paramCounter + 1};
`,
});

Expand Down

0 comments on commit dc8c215

Please sign in to comment.