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:
@@ -66,6 +66,7 @@ export async function GET(
|
||||
(x) =>
|
||||
x.isActive &&
|
||||
x.isPublished &&
|
||||
x.relationships.city.name &&
|
||||
equalsIgnoreCaseAndAccents(x.relationships.city.name, cityParam)
|
||||
)
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ export function createDataResponse(
|
||||
hotels: Array<{
|
||||
name: string
|
||||
distanceToCentre?: number | undefined
|
||||
relationships: { city: { name: string } }
|
||||
relationships: { city: { name: string | undefined } }
|
||||
images?: { large?: string } | undefined
|
||||
}>
|
||||
},
|
||||
|
||||
@@ -63,8 +63,10 @@ export async function GET(
|
||||
(x) =>
|
||||
x.isActive &&
|
||||
x.isPublished &&
|
||||
cities.some((c) =>
|
||||
equalsIgnoreCaseAndAccents(x.relationships.city.name, c.name)
|
||||
cities.some(
|
||||
(c) =>
|
||||
x.relationships.city.name &&
|
||||
equalsIgnoreCaseAndAccents(x.relationships.city.name, c.name)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user