chore: fixed a typo #37

Merged
y merged 1 commits from payload-validation into staging 2025-04-07 05:42:20 +00:00
2 changed files with 7 additions and 9 deletions
.vscode
src/utils/validation

@ -52,8 +52,6 @@
"Typica",
"Verte",
"VSOP",
"wineyard",
"wineyards",
"Yamahai",
"Yuzu"
]

@ -232,16 +232,16 @@ export const wineValidation = (data: unknown): Joi.ValidationResult =>
}
/**
* Wineyard
* Vineyard
*/
// list of supported wineyards
const wineyards: string[] = (
// list of supported vineyards
const vineyards: string[] = (
(regionMap as WineRegion)[providedRegion] as {
[key: string]: { [key: string]: string[] }
}
)[providedSubRegionName][providedVillageName]
const providedWineyard: string = (
const providedVineyard: string = (
value[providedRegion] as {
[key: string]: {
[key: string]: string
@ -249,8 +249,8 @@ export const wineValidation = (data: unknown): Joi.ValidationResult =>
}
)[providedSubRegionName][providedVillageName]
// check if provided wineyard is in the supported list
if (!wineyards.includes(providedWineyard)) {
// check if provided vineyard is in the supported list
if (!vineyards.includes(providedVineyard)) {
return returnCustomMessage(
[
country,
@ -258,7 +258,7 @@ export const wineValidation = (data: unknown): Joi.ValidationResult =>
providedSubRegionName,
providedVillageName
],
wineyards
vineyards
)
}
}