新增API接口模块

This commit is contained in:
hdm 2021-07-28 15:16:29 +08:00
parent 19368ab7ea
commit 7e78818a71
2 changed files with 3 additions and 4 deletions

View File

@ -8,6 +8,7 @@ declare (strict_types = 1);
namespace app\api\controller;
use app\api\BaseController;
use app\api\middleware\Auth;
use app\api\service\JwtAuth;
use think\facade\Db;
use think\facade\Request;
@ -18,8 +19,8 @@ class Index extends BaseController
* 控制器中间件 [登录、注册 不需要鉴权]
* @var array
*/
protected $middleware = [
'app\api\middleware\Auth' => ['except' => ['index','login', 'reg']],
protected $middleware = [
Auth::class => ['except' => ['index','login','reg'] ]
];
/**

View File

@ -5,6 +5,4 @@ return [
//'think\middleware\SessionInit',
//验证勾股cms是否完成安装
\app\home\middleware\Install::class,
//验证Token操作权限
\app\api\middleware\Auth::class,
];