diff --git a/app/Request.php b/app/Request.php index edcc841..478a693 100644 --- a/app/Request.php +++ b/app/Request.php @@ -38,7 +38,7 @@ class Request extends \think\Request if ($e instanceof TokenInvalidException) { throw new FailedException('token 不合法', Code::LOST_LOGIN); } - throw new FailedException('auth failed', Code::LOST_LOGIN); + throw new FailedException('认证失败: '. $e->getMessage(), Code::LOST_LOGIN); } return $user; diff --git a/extend/catcher/command/install/GetModuleTrait.php b/extend/catcher/command/install/traits/GetModuleTrait.php similarity index 100% rename from extend/catcher/command/install/GetModuleTrait.php rename to extend/catcher/command/install/traits/GetModuleTrait.php diff --git a/extend/catcher/command/install/UninstallModuleCommand.php b/extend/catcher/command/install/traits/UninstallModuleCommand.php similarity index 100% rename from extend/catcher/command/install/UninstallModuleCommand.php rename to extend/catcher/command/install/traits/UninstallModuleCommand.php diff --git a/extend/catcher/command/install/UpdateCatchModuleCommand.php b/extend/catcher/command/install/traits/UpdateCatchModuleCommand.php similarity index 100% rename from extend/catcher/command/install/UpdateCatchModuleCommand.php rename to extend/catcher/command/install/traits/UpdateCatchModuleCommand.php diff --git a/extend/catcher/library/rate/GrantLimit.php b/extend/catcher/library/rate/GrantLimit.php new file mode 100644 index 0000000..fa9d783 --- /dev/null +++ b/extend/catcher/library/rate/GrantLimit.php @@ -0,0 +1,10 @@ +handle) { + $this->handle = Cache::store('redis')->handler(); + } + + return $this->handle; + } + + + + public function __call($name, $arguments) + { + // TODO: Implement __call() method. + return $this->handle->{$name}(...$arguments); + } +} \ No newline at end of file