@ApiOperation("Show account")
@ApiResponses({
@ApiResponse(code = 200, message = "Return the view of the account", response = String.class)
})
@GetMapping
public String showAccount(
Model model, @RequestParam(value = "showCodes", defaultValue = "false") boolean showCodes) {
TwoFactorAuthenticationSetting twoFactorAuthenticationApp =
authenticationSettings.getTwoFactorAuthentication();
boolean isTwoFactorAuthenticationEnableForUser =
userAccountService.getCurrentUser().isTwoFactorAuthentication();
model.addAttribute("user", userAccountService.getCurrentUser());
model.addAttribute("countries", CountryCodes.get());
model.addAttribute("min_password_length", MIN_PASSWORD_LENGTH);
model.addAttribute("two_factor_authentication_app_option", twoFactorAuthenticationApp);
model.addAttribute(
"two_factor_authentication_user_enabled", isTwoFactorAuthenticationEnableForUser);
model.addAttribute("show_recovery_codes", showCodes);
return "view-useraccount";
}