From 864c8fa84ca2587d38cb08cf80f0b30b093ba986 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Wed, 16 Mar 2022 18:08:49 +0800 Subject: [PATCH] modify plugin name --- kiri-gii/GiiController.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/kiri-gii/GiiController.php b/kiri-gii/GiiController.php index 8f6a949d..8a0f6729 100644 --- a/kiri-gii/GiiController.php +++ b/kiri-gii/GiiController.php @@ -69,10 +69,9 @@ use Exception; use Kiri\Annotation\Target; use Kiri\Annotation\Route\Middleware; use Kiri\Annotation\Route\Route; +use Kiri\Annotation\Route\RequestMethod; use Kiri\Core\Str; use Kiri\Core\Json; -use Kiri\Message\Context\Request; -use Kiri\Message\Context\Response; use Kiri\Message\Controller; use JetBrains\PhpStorm\ArrayShape; use {$model_namespace}\\{$managerName}; @@ -180,7 +179,7 @@ use {$model_namespace}\\{$managerName}; * @return string * @throws Exception */ - #[Route(uri: "' . $_path . '/add", method: "POST")] + #[Route(uri: "' . $_path . '/add", method: RequestMethod::REQUEST_POST)] #[Middleware(middleware: [])] public function actionAdd(): string { @@ -235,7 +234,7 @@ use {$model_namespace}\\{$managerName}; * @return string * @throws Exception */ - #[Route(uri: "' . $_path . '/update", method: "POST")] + #[Route(uri: "' . $_path . '/update", method: RequestMethod::REQUEST_POST)] #[Middleware(middleware: [])] public function actionUpdate(): string { @@ -272,7 +271,7 @@ use {$model_namespace}\\{$managerName}; * @return string * @throws Exception */ - #[Route(uri: "' . $_path . '/batch-delete", method: "POST")] + #[Route(uri: "' . $_path . '/batch-delete", method: RequestMethod::REQUEST_POST)] #[Middleware(middleware: [])] public function actionBatchDelete(): string { @@ -309,7 +308,7 @@ use {$model_namespace}\\{$managerName}; * @return string * @throws Exception */ - #[Route(uri: "' . $_path . '/detail", method: "POST")] + #[Route(uri: "' . $_path . '/detail", method: RequestMethod::REQUEST_POST)] #[Middleware(middleware: [])] public function actionDetail(): string { @@ -341,7 +340,7 @@ use {$model_namespace}\\{$managerName}; * @return string * @throws Exception */ - #[Route(uri: "' . $_path . '/delete", method: "POST")] + #[Route(uri: "' . $_path . '/delete", method: RequestMethod::REQUEST_POST)] #[Middleware(middleware: [])] public function actionDelete(): string { @@ -379,7 +378,7 @@ use {$model_namespace}\\{$managerName}; * @return string * @throws Exception */ - #[Route(uri: "' . $_path . '/list", method: "POST")] + #[Route(uri: "' . $_path . '/list", method: RequestMethod::REQUEST_GET)] #[Middleware(middleware: [])] public function actionList(): string {