Merged in chore/remove-enrichHotel-call (pull request #3244)
Chore/remove enrichHotel call * chore: remove enrichHotel api call * include cityId when errors happen * remove unused funciton and cleanup code * tests no longer expect us to have called a function that is not used * remove commented code Approved-by: Linus Flood
This commit is contained in:
@@ -5,7 +5,7 @@ export const autoCompleteLocationSchema = z.object({
|
||||
name: z.string(),
|
||||
type: z.enum(["cities", "hotels", "countries"]),
|
||||
searchTokens: z.array(z.string()),
|
||||
destination: z.string(),
|
||||
destination: z.string().optional(),
|
||||
url: z.string().optional(),
|
||||
cityIdentifier: z.string().optional(),
|
||||
})
|
||||
|
||||
@@ -38,7 +38,7 @@ export function filterAutoCompleteLocations<T extends AutoCompleteLocation>(
|
||||
const searchable = locations.map((x) => ({
|
||||
...x,
|
||||
nameTokens: extractTokens(x.name),
|
||||
destinationTokens: extractTokens(x.destination),
|
||||
destinationTokens: extractTokens(x.destination ?? ""),
|
||||
}))
|
||||
fuseConfig.setCollection(searchable)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user