feat : Composite permission
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user