Skip to content

Commit

Permalink
fix: comment code defines url by language
Browse files Browse the repository at this point in the history
  • Loading branch information
Sotatek-PhucNguyen5 committed Nov 23, 2023
1 parent c2a5282 commit 77323f0
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -35,11 +35,13 @@ public void sendVerifyEmail(String email, EUserAction emailType, String code, Lo
helper.setFrom(mail.getFrom(), localeProvider.getValue("mail.sender", locale));
helper.setTo(email);
StringBuilder verifyURL = new StringBuilder(domainClient);
/* Config multiple language for mail
if (locale.equals(new Locale("en"))) {
verifyURL.append(CommonConstant.ENGLISH_URL);
} else if (locale.equals(new Locale("fr"))) {
verifyURL.append(CommonConstant.FRENCH_URL);
}
*/
switch (emailType) {
case CREATED -> {
verifyURL.append("/verify-email?code=").append(code);
Expand All @@ -49,8 +51,7 @@ public void sendVerifyEmail(String email, EUserAction emailType, String code, Lo
verifyURL.append("/reset-password?code=").append(code);
helper.setSubject(localeProvider.getValue("mail.subject-reset-password", locale));
}
default -> {
}
default -> log.error("Mail type incorrect: " + emailType);
}
contentHtml = contentHtml.replace("[URL]", verifyURL);
contentHtml = contentHtml + localeProvider.getValue("mail.footer", locale);
Expand Down

0 comments on commit 77323f0

Please sign in to comment.