diff options
author | terminaldweller <thabogre@gmail.com> | 2022-03-16 05:47:37 +0000 |
---|---|---|
committer | terminaldweller <thabogre@gmail.com> | 2022-03-16 05:47:37 +0000 |
commit | 1d05064b590d119065495a6d9ce30ae2d4aab05d (patch) | |
tree | b72546f16c7952060ea903b39ce19933f22fe884 /src/main/java/com/terminaldweller/doc/DocController.java | |
parent | added a new doc class, added self-signed certs to the docker image (diff) | |
download | mdrtl-1d05064b590d119065495a6d9ce30ae2d4aab05d.tar.gz mdrtl-1d05064b590d119065495a6d9ce30ae2d4aab05d.zip |
wip
Diffstat (limited to '')
-rw-r--r-- | src/main/java/com/terminaldweller/doc/DocController.java | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/main/java/com/terminaldweller/doc/DocController.java b/src/main/java/com/terminaldweller/doc/DocController.java new file mode 100644 index 0000000..564f37c --- /dev/null +++ b/src/main/java/com/terminaldweller/doc/DocController.java @@ -0,0 +1,24 @@ +package com.terminaldweller.doc; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** The document controller class. */ +@RestController +@RequestMapping(path = "api/v1/doc") +public class DocController { + private final DocService docService; + + @Autowired + public DocController(DocService docService) { + this.docService = docService; + } + + @GetMapping + public List<Doc> getDocs() { + return docService.getDocs(); + } +} |