diff --git a/backend/app/Controller/IndexController.php b/backend/app/Controller/IndexController.php index 9be020b..d39403c 100644 --- a/backend/app/Controller/IndexController.php +++ b/backend/app/Controller/IndexController.php @@ -12,16 +12,34 @@ declare(strict_types=1); namespace App\Controller; +use Hyperf\HttpServer\Annotation\Controller; +use Hyperf\HttpServer\Annotation\RequestMapping; + +#[Controller] class IndexController extends AbstractController { + // #[RequestMapping('/', methods: ['GET', 'POST'])] public function index() { - $user = $this->request->input('user', 'Hyperf'); $method = $this->request->getMethod(); return [ 'method' => $method, - 'message' => "Hello {$user}.", + 'message' => "Dataflow App", + ]; + } + + #[RequestMapping('/favicon.ico', methods: ['GET', 'POST'])] + public function favicon() + { + return []; + } + + #[RequestMapping('/health', methods: 'GET')] + public function health() + { + return [ + 'message' => "System status ok", ]; } }