Skip to content

Commit

Permalink
Update amount of items returned
Browse files Browse the repository at this point in the history
  • Loading branch information
wissehes committed Aug 6, 2023
1 parent a132abe commit 35a5fa9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pages/api/trains/nearby.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type Data = any;
const schema = z.object({
latitude: z.string().transform(Number),
longitude: z.string().transform(Number),
radius: z.string().regex(/^\d+$/).transform(Number),
radius: z.string().regex(/^\d+$/).transform(Number).optional(),
});

export default async function handler(
Expand Down Expand Up @@ -44,7 +44,7 @@ export default async function handler(
})
.sort((a, b) => a.distance - b.distance);

const filtered = mapped.slice(0, 20);
const filtered = mapped.slice(0, 5);

// const withInfo = await getTrainData()

Expand Down

0 comments on commit 35a5fa9

Please sign in to comment.