Skip to content
Snippets Groups Projects
Commit 45e9a7da authored by Joshua Grey's avatar Joshua Grey
Browse files

Remove unneccecary changes

parent 87f71a42
Branches
Tags
No related merge requests found
......@@ -31,14 +31,14 @@ public class ComplaintController {
this.complaintService = complaintService;
this.commentService = commentService;
}
@PostMapping ("/add")
public ModelAndView addComplaint(@Valid Complaint complaint, BindingResult bindingResult, Authentication authentication, Model model){
@PostMapping("/add")
public ModelAndView addComplaint(@Valid Complaint complaint, BindingResult bindingResult, Authentication authentication, Model model) {
if (bindingResult.hasErrors()) {
if (bindingResult.hasErrors()){
ModelAndView modelandView = new ModelAndView("complaint/newComplaint", model.asMap());
return modelandView;
} else {
}
else {
complaintService.addComplaint(complaint, authentication);
String accessLevel = authentication.getAuthorities().iterator().next().toString().toLowerCase();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment