Merge branch 'dev' into main

This commit is contained in:
Alexis
2023-05-04 18:28:03 +02:00
4 changed files with 8 additions and 3 deletions

1
.env
View File

@@ -1 +0,0 @@
GOOGLE_API_KEY=AIzaSyAaVfXbFPUQSeif2FwY1gQ2iJaBp9ZPdPM

2
.gitignore vendored
View File

@@ -56,3 +56,5 @@ profile-*
profile* profile*
*clinic* *clinic*
*flamegraph* *flamegraph*
.env

View File

@@ -81,6 +81,10 @@ app.use('/rep', async (req, res) => {
} }
} }
if (!circoForeign) {
throw new Error('Error trying to parse this country : ' + countryName)
}
// If a code is found, send the associated file containing the representant data // If a code is found, send the associated file containing the representant data
const repFile = readFileSync(join(__dirname, `public/reps/${lookupTable[circoForeign]}.json`), 'utf-8') const repFile = readFileSync(join(__dirname, `public/reps/${lookupTable[circoForeign]}.json`), 'utf-8')
res.end(repFile) res.end(repFile)

View File

@@ -84,7 +84,7 @@ module.exports = {
"Slovakia", "Slovakia",
], ],
"099-08": [ "099-08": [
"Italia", "Italy",
"Malta", "Malta",
"San Marino", "San Marino",
"Holy See", "Holy See",
@@ -147,7 +147,7 @@ module.exports = {
"São Tomé and Príncipe", "São Tomé and Príncipe",
"Angola", "Angola",
"Congolese", "Congolese",
"Democratic Republic of Congo", "Democratic Republic of the Congo",
"Iraq", "Iraq",
"Jordan", "Jordan",
"Lebanon", "Lebanon",