refactor(admin/middleware): update request type to app\Request
Change the type of the request parameter in middleware handle functions to use app\Request instead of the plain $request. This update clarifies the expected request object type for better type checking and autocompletion support.
This commit is contained in:
@@ -4,6 +4,7 @@ namespace app\admin\middleware;
|
||||
|
||||
use app\common\service\AuthService;
|
||||
use app\common\traits\JumpTrait;
|
||||
use app\Request;
|
||||
use Closure;
|
||||
use think\db\exception\DataNotFoundException;
|
||||
use think\db\exception\DbException;
|
||||
@@ -18,7 +19,7 @@ class CheckAuth
|
||||
* @throws DbException
|
||||
* @throws DataNotFoundException
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
public function handle(Request $request, Closure $next)
|
||||
{
|
||||
$adminUserInfo = $request->adminUserInfo;
|
||||
if (empty($adminUserInfo)) return $next($request);
|
||||
|
||||
Reference in New Issue
Block a user