Skip to content

Commit

Permalink
fix(server): ensure default pagination for properties endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
csulit committed Oct 18, 2024
1 parent c7c4c9c commit 029018c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@ app.get("/api/properties", async (c: Context) => {
max_distance_km?: string;
};

if (!query.page || !query.page_size) {
if (!query.page) {
query.page = "1";
}

if (!query.page_size) {
query.page_size = "10";
}

Expand Down

0 comments on commit 029018c

Please sign in to comment.