mirror of
https://gitee.com/ctexthuang/hyperf-micro-svc.git
synced 2026-02-08 10:20:16 +08:00
fix : common request
This commit is contained in:
@@ -45,7 +45,7 @@ class PermissionMiddleware implements MiddlewareInterface
|
||||
*/
|
||||
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
|
||||
{
|
||||
$adminId = $this->getToken()?->claims()?->get(RegisteredClaims::ID) ?? 0;
|
||||
$adminId = (int) $this->getToken()?->claims()?->get(RegisteredClaims::ID) ?? 0;
|
||||
if ($adminId <= 0) throw new ErrException('账户不存在');
|
||||
|
||||
$this->adminUserInfo = $this->getAdminUserInfo($adminId);
|
||||
|
||||
Reference in New Issue
Block a user