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.

27 lines
593 B

  1. <?php
  2. namespace App\Controller;
  3. use App\Service\ParamsTokenServiceInterface;
  4. use Hyperf\Di\Annotation\Inject;
  5. class ParamsTokenController extends BaseController
  6. {
  7. /**
  8. * @Inject
  9. * @var ParamsTokenServiceInterface
  10. */
  11. protected $paramsTokenService;
  12. public function generate()
  13. {
  14. $res = $this->paramsTokenService->generate($this->request->all());
  15. return $this->success($res);
  16. }
  17. public function analyze()
  18. {
  19. $res = $this->paramsTokenService->analyze($this->request->input('token'));
  20. return $this->success($res);
  21. }
  22. }