diff --git a/apps/scandic-web/server/routers/autocomplete/destinations.ts b/apps/scandic-web/server/routers/autocomplete/destinations.ts index 0020cdf98..064d6553b 100644 --- a/apps/scandic-web/server/routers/autocomplete/destinations.ts +++ b/apps/scandic-web/server/routers/autocomplete/destinations.ts @@ -14,6 +14,7 @@ import { getCitiesByCountry, getCountries, getLocations } from "../hotels/utils" import { filterAndCategorizeAutoComplete } from "./util/filterAndCategorizeAutoComplete" import { mapLocationToAutoCompleteLocation } from "./util/mapLocationToAutoCompleteLocation" +import { ApiCountry, type Country } from "@/types/enums/country" import type { AutoCompleteLocation } from "./schema" const destinationsAutoCompleteInputSchema = z.object({ @@ -119,7 +120,9 @@ export const getDestinationsAutoCompleteRoute = safeProtectedServiceProcedure const countryAutoCompleteLocations = countries.data.map((country) => { const url = countryUrls.find( - (c) => c.country && c.country === country.name + (c) => + c.country && + ApiCountry[lang][c.country as Country] === country.name )?.url return {