minor modifications

This commit is contained in:
DOHA 2015-02-17 20:01:50 +02:00
parent 4acb3eee83
commit c5081d8c28
2 changed files with 2 additions and 3 deletions

View File

@ -39,7 +39,6 @@ public class MvcConfig extends WebMvcConfigurerAdapter {
registry.addViewController("/logout.html"); registry.addViewController("/logout.html");
registry.addViewController("/homepage.html"); registry.addViewController("/homepage.html");
registry.addViewController("/expiredAccount.html"); registry.addViewController("/expiredAccount.html");
registry.addViewController("/regitrationConfirm.html");
registry.addViewController("/badUser.html"); registry.addViewController("/badUser.html");
registry.addViewController("/emailError.html"); registry.addViewController("/emailError.html");
registry.addViewController("/home.html"); registry.addViewController("/home.html");

View File

@ -129,7 +129,7 @@ public class RegistrationController {
final VerificationToken newToken = userService.generateNewVerificationToken(existingToken); final VerificationToken newToken = userService.generateNewVerificationToken(existingToken);
final User user = userService.getUser(newToken.getToken()); final User user = userService.getUser(newToken.getToken());
final String appUrl = "http://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath(); final String appUrl = "http://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath();
final SimpleMailMessage email = constructResetVerificationTokenEmail(appUrl, request.getLocale(), newToken, user); final SimpleMailMessage email = constructResendVerificationTokenEmail(appUrl, request.getLocale(), newToken, user);
mailSender.send(email); mailSender.send(email);
return new GenericResponse(messages.getMessage("message.resendToken", null, request.getLocale())); return new GenericResponse(messages.getMessage("message.resendToken", null, request.getLocale()));
@ -187,7 +187,7 @@ public class RegistrationController {
// NON-API // NON-API
private final SimpleMailMessage constructResetVerificationTokenEmail(final String contextPath, final Locale locale, final VerificationToken newToken, final User user) { private final SimpleMailMessage constructResendVerificationTokenEmail(final String contextPath, final Locale locale, final VerificationToken newToken, final User user) {
final String confirmationUrl = contextPath + "/regitrationConfirm.html?token=" + newToken.getToken(); final String confirmationUrl = contextPath + "/regitrationConfirm.html?token=" + newToken.getToken();
final String message = messages.getMessage("message.resendToken", null, locale); final String message = messages.getMessage("message.resendToken", null, locale);
final SimpleMailMessage email = new SimpleMailMessage(); final SimpleMailMessage email = new SimpleMailMessage();