new route fix

This commit is contained in:
omenem 2020-04-26 12:13:46 +02:00
parent 8be7b2c263
commit 10dc0c9741

View file

@ -51,6 +51,11 @@ public class AutomationController {
.collect(Collectors.toList());
}
@GetMapping("/{id}")
public Automation get(@PathVariable long id) throws NotFoundException {
return automationRepository.findById(id).orElseThrow(NotFoundException::new);
}
private Automation save(Automation newRL, AutomationSaveRequest s) {
newRL.setName(s.getName());