PAN-54 IT WORKS
This commit is contained in:
@@ -30,15 +30,9 @@ public class UserCreationController {
|
||||
|
||||
@PostMapping({"/",""})
|
||||
public String registerUser(@Validated final UserCreationForm userCreationForm, final Model model) {
|
||||
//model.addAttribute("userID", userCreationForm.getUserID());
|
||||
model.addAttribute("username", userCreationForm.getUsername());
|
||||
model.addAttribute("password", userCreationForm.getPassword());
|
||||
//model.addAttribute("confirmPassword", userCreationForm.getConfirmPassword());
|
||||
model.addAttribute("emailAddress", userCreationForm.getEmailAddress());
|
||||
//model.addAttribute("firstName", userCreationForm.getFirstName());
|
||||
//model.addAttribute("lastName", userCreationForm.getLastName());
|
||||
//model.addAttribute("referrer", userCreationForm.getReferrer());
|
||||
//model.addAttribute("TnCAgreement", userCreationForm.isAgreedToTerms());
|
||||
|
||||
LOG.info("Saving user {}...", userCreationForm);
|
||||
|
||||
|
||||
@@ -5,15 +5,10 @@ import lombok.Setter;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Positive;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class UserCreationForm {
|
||||
@NotNull
|
||||
@Positive
|
||||
private int userID;
|
||||
|
||||
@NotNull
|
||||
@NotEmpty
|
||||
private String username;
|
||||
@@ -30,16 +25,6 @@ public class UserCreationForm {
|
||||
@NotEmpty
|
||||
private String emailAddress;
|
||||
|
||||
@NotNull
|
||||
@NotEmpty
|
||||
private String firstName;
|
||||
|
||||
@NotNull
|
||||
@NotEmpty
|
||||
private String lastName;
|
||||
|
||||
private String referrer; // optional
|
||||
|
||||
@NotNull
|
||||
private boolean agreedToTerms;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user