fix route
This commit is contained in:
parent
59e2c9b544
commit
05296bb26e
@ -56,8 +56,11 @@ public class PaperController {
|
||||
}
|
||||
|
||||
@PostMapping(value = "/paper", params = "addDeadline")
|
||||
public String addDeadline(@Valid PaperDto paperDto) {
|
||||
public String addDeadline(@Valid PaperDto paperDto, Errors errors) {
|
||||
filterEmptyDeadlines(paperDto);
|
||||
if (errors.hasErrors()) {
|
||||
return "/papers/paper";
|
||||
}
|
||||
paperDto.getDeadlines().add(new DeadlineDto());
|
||||
return "/papers/paper";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user