fix : jwt

This commit is contained in:
2025-09-12 23:54:03 +08:00
parent ea6abe3043
commit 68ecac2fb9
8 changed files with 121 additions and 42 deletions

View File

@@ -8,6 +8,7 @@ use App\Annotation\ResponseFormat;
use App\Controller\AbstractController;
use App\Request\Admin\LoginRequest;
use App\Service\Admin\Login\LoginService;
use App\Service\Admin\Login\RefreshService;
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\RequestMapping;
use Hyperf\Validation\Annotation\Scene;
@@ -18,8 +19,14 @@ final class LoginController extends AbstractController
{
#[RequestMapping(path: "login", methods: "POST")]
#[Scene(scene: "login")]
public function login(LoginRequest $request)
public function login(LoginRequest $request): array
{
return (new LoginService)->handle();
}
#[RequestMapping(path: "refresh", methods: "POST")]
public function refresh(): array
{
return (new RefreshService)->handle();
}
}