mirror of
https://gitee.com/ctexthuang/hyperf_rbac_framework_server_ctexthuang.git
synced 2025-12-25 17:07:49 +08:00
33 lines
800 B
PHP
33 lines
800 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Controller\Admin;
|
|
|
|
use App\Annotation\ResponseFormat;
|
|
use App\Middleware\Token\AdminTokenMiddleware;
|
|
use App\Service\Admin\AdminUser\UserService;
|
|
use Hyperf\HttpServer\Annotation\Controller;
|
|
use Hyperf\HttpServer\Annotation\Middleware;
|
|
use Hyperf\HttpServer\Annotation\RequestMapping;
|
|
use Hyperf\Validation\Annotation\Scene;
|
|
|
|
|
|
#[Controller(prefix: "admin/adminUser")]
|
|
#[ResponseFormat('admin')]
|
|
#[Middleware(AdminTokenMiddleware::class)]
|
|
class AdminUserController
|
|
{
|
|
#[RequestMapping(path: "getInfo", methods: "GET")]
|
|
public function getInfo()
|
|
{
|
|
return (new UserService)->handle();
|
|
}
|
|
|
|
#[RequestMapping(path: "refresh", methods: "POST")]
|
|
public function refresh()
|
|
{
|
|
return (new UserService)->refresh();
|
|
}
|
|
}
|