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