fix(SW-3203): Added property id to pointOfInterestSchema to handle identical names

Approved-by: Matilda Landström
Approved-by: Chuma Mcphoy (We Ahead)
This commit is contained in:
Erik Tiekstra
2025-08-26 05:58:25 +00:00
parent 091c46f85c
commit 8180271b0f
4 changed files with 29 additions and 34 deletions

View File

@@ -16,6 +16,7 @@ export const pointOfInterestSchema = z
name: nullableStringValidator,
})
.transform((poi) => ({
id: `${poi.name}-${poi.location.latitude}-${poi.location.longitude}`,
categoryName: poi.category.name,
coordinates: {
lat: poi.location.latitude,