From 5e002823097a2a7f8ec2a15464613953e77ceb34 Mon Sep 17 00:00:00 2001 From: Maurice Date: Fri, 30 Oct 2026 17:26:56 +0100 Subject: [PATCH] maps: drop indexHitsOnly, which the search no longer needs, and keep isHit inside its module --- server/src/nest/maps/providers/osm-geocoding.ts | 2 +- server/src/nest/maps/trek-places.client.ts | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/server/src/nest/maps/providers/osm-geocoding.ts b/server/src/nest/maps/providers/osm-geocoding.ts index 2adb12015..a9fb1727f 100644 --- a/server/src/nest/maps/providers/osm-geocoding.ts +++ b/server/src/nest/maps/providers/osm-geocoding.ts @@ -57,7 +57,7 @@ export function searchRecord(item: NominatimResult) { }; } -export function isHit(hit: NominatimResult | null): hit is NominatimResult { +function isHit(hit: NominatimResult | null): hit is NominatimResult { return hit !== null; } diff --git a/server/src/nest/maps/trek-places.client.ts b/server/src/nest/maps/trek-places.client.ts index 07beda067..21875aa7c 100644 --- a/server/src/nest/maps/trek-places.client.ts +++ b/server/src/nest/maps/trek-places.client.ts @@ -396,11 +396,6 @@ export async function trekPlacesSearch( return Array.isArray(body.results) ? body.results.map(withLocality) : []; } -/** The index-only rows of a mixed result, for callers that need Overture fields. */ -export function indexHitsOnly(hits: TrekSearchHit[]): TrekPlace[] { - return hits.filter((h): h is TrekPlace => !isOsmHit(h)); -} - /** * The planner's category pills, mapped onto Overture categories. *