chore: fixed a typo #37
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@ -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
|
||||
)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user