Skip to content

Commit

Permalink
fix: limit city search to 100 results
Browse files Browse the repository at this point in the history
  • Loading branch information
evanp committed Nov 27, 2024
1 parent 83a1bab commit bc638e9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/routes/search.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,8 @@ async function searchCity(res: any, q: string) {
WHERE
a.type = 'city'
AND an.name ${isLowercase ? "ILIKE" : "LIKE"} :search
ORDER BY lp.population DESC NULLS LAST;`,
ORDER BY lp.population DESC NULLS LAST
LIMIT 100;`,
{
replacements: { search: `${q}%` },
type: sequelize.QueryTypes.SELECT,
Expand Down

0 comments on commit bc638e9

Please sign in to comment.