api: add / route
Some checks failed
Deploy API / docker (17, 3.8.5) (push) Failing after 35s

This commit is contained in:
Lee 2024-08-01 06:45:51 +01:00
parent bd4b042c3d
commit 1a13c08da8

@ -0,0 +1,25 @@
package cc.fascinated.controller;
import java.util.Map;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
/**
* @author Fascinated (fascinated7)
*/
@RestController
@RequestMapping(value = "/")
public class RootController {
/**
* A GET mapping to show the
*/
@ResponseBody
@GetMapping(value = "/")
public ResponseEntity<?> getWelcome() {
return ResponseEntity.ok(Map.of("message", "Hello!"));
}
}