You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

28 lines
606 B

<?php
namespace App\Controller;
use App\Service\ParamsTokenServiceInterface;
use Hyperf\Di\Annotation\Inject;
class ParamsTokenController extends BaseController
{
/**
* @Inject
* @var ParamsTokenServiceInterface
*/
protected $paramsTokenService;
public function generate()
{
$res = $this->paramsTokenService->generate($this->request->all());
return $this->success(['token' => $res]);
}
public function analyze()
{
$res = $this->paramsTokenService->analyze($this->request->input('token'));
return $this->success($res);
}
}