28 lines
758 B
PHP
28 lines
758 B
PHP
<?php
|
|
|
|
namespace App\Controller;
|
|
|
|
use App\Request\SafeRequest;
|
|
use App\Services\SafeService;
|
|
use Psr\Container\ContainerExceptionInterface;
|
|
use Psr\Container\NotFoundExceptionInterface;
|
|
use Psr\Http\Message\ResponseInterface;
|
|
|
|
class SafeController extends AbstractController
|
|
{
|
|
/**
|
|
* 获取oss签名数据
|
|
* @return ResponseInterface
|
|
* @throws ContainerExceptionInterface
|
|
* @throws NotFoundExceptionInterface
|
|
*/
|
|
public function getOssSign(): ResponseInterface
|
|
{
|
|
$request = $this->container->get(SafeRequest::class);
|
|
$request->scene('getOssSign')->validateResolved();
|
|
|
|
$SafeService = new SafeService();
|
|
$data = $SafeService->getOssSign();
|
|
return $this->response->json($data);
|
|
}
|
|
} |