feat : Composite permission

This commit is contained in:
2025-09-07 20:04:28 +08:00
parent 714baffaf7
commit 7c789a2249
6 changed files with 273 additions and 2 deletions

View File

@@ -5,6 +5,7 @@ declare(strict_types=1);
namespace App\Controller\Test;
use App\Service\Test\Composite\FileService;
use App\Service\Test\Composite\PermissionService;
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\RequestMapping;
use Hyperf\HttpServer\Contract\RequestInterface;
@@ -14,11 +15,20 @@ use Hyperf\HttpServer\Contract\ResponseInterface;
class CompositeController
{
/**
* @return array|null
* @return array
*/
#[RequestMapping(path: 'file', methods: 'GET')]
public function file()
public function file(): array
{
return (new FileService)->handle();
}
/**
* @return array
*/
#[RequestMapping(path: 'permission', methods: 'GET')]
public function permission(): array
{
return (new PermissionService)->handle();
}
}