Merged in fix/warmup-autocomplete-data-2 (pull request #2218)

fix: chunked data overwrote it self

* fix: chunked data overwrote it self


Approved-by: Linus Flood
This commit is contained in:
Joakim Jäderberg
2025-05-26 09:39:48 +00:00
parent c963891ca7
commit b20c8ce42b
3 changed files with 98 additions and 74 deletions

View File

@@ -41,7 +41,6 @@ export const getDestinationsAutoCompleteRoute = safeProtectedServiceProcedure
.input(destinationsAutoCompleteInputSchema)
.query(async ({ ctx, input }): Promise<DestinationsAutoCompleteOutput> => {
const lang = input.lang || ctx.lang
const locations: AutoCompleteLocation[] =
await getAutoCompleteDestinationsData({
lang,
@@ -107,6 +106,7 @@ export async function getAutoCompleteDestinationsData({
})
if (!countries) {
console.error("Unable to fetch countries")
throw new Error("Unable to fetch countries")
}
@@ -142,6 +142,7 @@ export async function getAutoCompleteDestinationsData({
!cityUrls ||
!countryUrls
) {
console.error("Unable to fetch location URLs")
throw new Error("Unable to fetch location URLs")
}