[#1] Clearer location

This commit is contained in:
Ahmed Al-Taiar
2024-10-24 20:06:09 -04:00
parent 03717113f4
commit f097d7761d
12 changed files with 40 additions and 20 deletions

View File

@ -11,7 +11,7 @@
"@redwoodjs/graphql-server": "8.4.0",
"@tus/file-store": "^1.4.0",
"@tus/server": "^1.7.0",
"country-flag-icons": "^1.5.13",
"countries-list": "^3.1.1",
"graphql-scalars": "^1.23.0",
"nodemailer": "^6.9.14"
},

View File

@ -16,9 +16,9 @@ enum Theme {
}
;(async () => {
const { hasFlag } = await import('country-flag-icons')
const { countries } = await import('countries-list')
if (!hasFlag(process.env.COUNTRY))
if (!Object.keys(countries).includes(process.env.COUNTRY))
throw new Error(
'Invalid COUNTRY environment variable, please select a valid ISO-3166-1 alpha-2 country code\n See https://en.wikipedia.org/wiki/ISO_3166-1#Codes'
)