fix : common request

This commit is contained in:
2025-09-16 18:07:10 +08:00
parent be0d0913b6
commit 21331655f9
9 changed files with 46 additions and 33 deletions

View File

@@ -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);