diff options
author | terminaldweller <thabogre@gmail.com> | 2022-05-18 14:43:24 +0000 |
---|---|---|
committer | terminaldweller <thabogre@gmail.com> | 2022-05-18 14:43:24 +0000 |
commit | 52c86c942bae1e0e5e7ba97ea93efafbd4c198dd (patch) | |
tree | b1aa9b9b8c8104bb9ac787b399a12133e153e4b1 /src/main/java/com/terminaldweller/doc/DocService.java | |
parent | some fixes (diff) | |
download | mdrtl-52c86c942bae1e0e5e7ba97ea93efafbd4c198dd.tar.gz mdrtl-52c86c942bae1e0e5e7ba97ea93efafbd4c198dd.zip |
CRUD tested and working
Diffstat (limited to 'src/main/java/com/terminaldweller/doc/DocService.java')
-rw-r--r-- | src/main/java/com/terminaldweller/doc/DocService.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main/java/com/terminaldweller/doc/DocService.java b/src/main/java/com/terminaldweller/doc/DocService.java index 5a07c23..c8bab23 100644 --- a/src/main/java/com/terminaldweller/doc/DocService.java +++ b/src/main/java/com/terminaldweller/doc/DocService.java @@ -1,6 +1,5 @@ package com.terminaldweller.doc; -import java.util.List; import java.util.Optional; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -15,8 +14,8 @@ public class DocService { this.docRepository = docRepository; } - public List<Doc> getDocs() { - return docRepository.findAll(); + public Optional<Doc> getDocs(Long id) { + return docRepository.findById(id); } /** |