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:
Erik Tiekstra
2025-05-28 08:45:03 +00:00
committed by Linus Flood
parent 26b005d72a
commit 42701739a0
2 changed files with 2 additions and 2 deletions

View File

@@ -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,
} }

View File

@@ -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"),
}) })