성동스터디 (2021.09.09 ~ ing)/기타
[tistory][JavaScript] 티스토리 코드 줄 배경색상 변경
juniKang
2021. 12. 31. 17:04
티스토리로 코드를 올리면서 코드 박스 안에서 강조하고 싶은 코드를 어떻
28 68 40 / 13 38 30
84 36 38/48 26 31
13 17 23
@PostMapping("/sign-up")
public String signUpSubmit(
@Valid SignUpForm signUpForm,
Errors errors !hl!
) {
if (errors.hasErrors()) { !hl-!
return "account/sign-up"; !hl-!
} !hl-!
if (errors.hasErrors()) { !hl!
return "account/sign-up"; !hl!
} !hl!
Account account = accountService.processNewAccount(singUpForm);
accountService.login(account);
return "redirect:/";
}
@GetMapping("/check-email-token")
public String checkEmailToken(String token, String email, Model model) {
Account account = accountRepository.findByEmail(email);
String view = "account/checked-email";
if (account == null) { !hl!
model.addAttribute("error", "wrong.email"); !hl!
return view; !hl!
} !hl!
if (!account.isValidToken(token)) {
model.addAttribute("error", "wrong.token");
return view;
}
account.completeSignUp();
accountService.login(account);
model.addAttribute("numberOfUser", accountRepository.count());
model.addAttribute("nickname", account.getNickname());
return view;
}