Skip to content

Commit

Permalink
fix(locals): structureId should not be in lowercase
Browse files Browse the repository at this point in the history
  • Loading branch information
annelhote committed Dec 23, 2024
1 parent f9485bf commit 8adcf0a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bso-local-variation-validation.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ const sendEmail = (emails, structureId, structureName) => {
if (process.argv.length === 4) {
const emails = process.argv[2];
const structureId = process.argv[3];
const structureName = locals?.[structureId.toUpperCase()]?.commentsName;
const structureName = locals?.[structureId]?.commentsName;
if (structureName) {
sendEmail(emails, structureId.toLowerCase(), structureName);
sendEmail(emails, structureId, structureName);
} else {
console.error(`This structureId "${structureId.toUpperCase()}" does not exists in locals config file (src/config/locals.json).`);
console.error(`This structureId "${structureId}" does not exists in locals config file (src/config/locals.json).`);
}
} else {
console.error('Misuse, this command line require 2 arguments : email address and structure id');
Expand Down

0 comments on commit 8adcf0a

Please sign in to comment.