修改登录和权限路由

This commit is contained in:
wuyanwen
2020-01-20 14:38:32 +08:00
parent bb372844dc
commit 1a03783d26
2 changed files with 10 additions and 10 deletions

View File

@@ -47,16 +47,16 @@ class Index extends CatchController
], '登录成功') : CatchResponse::success('', '登录失败'); ], '登录成功') : CatchResponse::success('', '登录失败');
} }
/** /**
* 登出 * 登出
* *
* @time 2019年11月28日 * @time 2019年11月28日
* @return \think\response\Json * @param CatchAuth $auth
* @throws \Exception * @return \think\response\Json
*/ */
public function logout(): \think\response\Json public function logout(CatchAuth $auth): \think\response\Json
{ {
if (Auth::logout()) { if ($auth->logout()) {
return CatchResponse::success(); return CatchResponse::success();
} }

View File

@@ -1,6 +1,6 @@
<?php <?php
// 角色 // 角色
$router->resource('role', '\catchAdmin\permissions\controller\Role'); $router->resource('roles', '\catchAdmin\permissions\controller\Role');
// 角色列表 // 角色列表
$router->get('/role/get/permissions', '\catchAdmin\permissions\controller\Role@getPermissions'); $router->get('/role/get/permissions', '\catchAdmin\permissions\controller\Role@getPermissions');
// 权限 // 权限