Merged in fix/SW-2921-countryName (pull request #2249)
fix(SW-2921): Moved countryName to attributes in locations schema * fix(SW-2921): Moved countryName to attributes in locations schema Approved-by: Linus Flood
This commit is contained in:
committed by
Linus Flood
parent
26b005d72a
commit
42701739a0
@@ -440,7 +440,7 @@ export const locationsSchema = z.object({
|
|||||||
if (location.type === "cities") {
|
if (location.type === "cities") {
|
||||||
return {
|
return {
|
||||||
...location.attributes,
|
...location.attributes,
|
||||||
country: location?.countryName || "",
|
country: location.attributes.countryName || "",
|
||||||
id: location.id,
|
id: location.id,
|
||||||
type: location.type,
|
type: location.type,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ export const locationCitySchema = z.object({
|
|||||||
cityIdentifier: z.string().optional(),
|
cityIdentifier: z.string().optional(),
|
||||||
keyWords: z.array(z.string()).optional(),
|
keyWords: z.array(z.string()).optional(),
|
||||||
name: z.string().optional().default(""),
|
name: z.string().optional().default(""),
|
||||||
|
countryName: z.string().optional().default(""),
|
||||||
isPublished: z.boolean(),
|
isPublished: z.boolean(),
|
||||||
}),
|
}),
|
||||||
countryName: z.string().optional().default(""),
|
|
||||||
id: z.string().optional().default(""),
|
id: z.string().optional().default(""),
|
||||||
type: z.literal("cities"),
|
type: z.literal("cities"),
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user