Skip to content

Commit

Permalink
Merge pull request #62 from Marvell-Consulting/fix/trans-import
Browse files Browse the repository at this point in the history
extra check for values
  • Loading branch information
wheelsandcogs authored Dec 19, 2024
2 parents 2c4ed2b + 7c7aa3a commit 0565523
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/route/translation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ translationRouter.post(
if (!newTranslation) {
throw new BadRequestException('errors.translation_file.invalid.keys');
}

if (!newTranslation.english?.trim() || !newTranslation.cymraeg?.trim()) {
throw new BadRequestException('errors.translation_file.invalid.values');
}
});

// store the translation import in the datalake so we can use it once it's confirmed as correct
Expand Down

0 comments on commit 0565523

Please sign in to comment.