Merge branch '61-add-get-request-for-one-automation' into 'dev'
new route fix Closes #61 See merge request sa4-2020/the-sanmarinoes/backend!88
This commit is contained in:
commit
46bb2e7d26
1 changed files with 5 additions and 0 deletions
|
@ -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());
|
||||
|
||||
|
|
Loading…
Reference in a new issue