fixed:登录日志删除失败
This commit is contained in:
parent
09b20c255b
commit
097b0e1ee5
@ -4,7 +4,6 @@ namespace catchAdmin\system\controller;
|
||||
|
||||
use catcher\base\CatchController;
|
||||
use catcher\CatchResponse;
|
||||
use think\facade\Db;
|
||||
use catchAdmin\system\model\LoginLog as Log;
|
||||
|
||||
class LoginLog extends CatchController
|
||||
@ -26,11 +25,12 @@ class LoginLog extends CatchController
|
||||
*
|
||||
* @time 2020年04月28日
|
||||
* @param Log $log
|
||||
* @param $id
|
||||
* @throws \Exception
|
||||
* @return \think\response\Json
|
||||
*/
|
||||
public function empty(Log $log)
|
||||
public function empty($id, Log $log)
|
||||
{
|
||||
return CatchResponse::success($log->where('id', '>', 0)->delete(), '清空成功');
|
||||
return CatchResponse::success($log->deleteBy($id), '删除成功');
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
$router->group(function () use ($router) {
|
||||
// 登录日志
|
||||
$router->get('log/login', '\catchAdmin\system\controller\LoginLog@list');
|
||||
$router->delete('loginLog/empty', '\catchAdmin\system\controller\LoginLog@empty');
|
||||
$router->delete('log/login/<id>', '\catchAdmin\system\controller\LoginLog@empty');
|
||||
// 操作日志
|
||||
$router->get('log/operate', '\catchAdmin\system\controller\OperateLog@list');
|
||||
// $router->delete('empty/log/operate', '\catchAdmin\system\controller\OperateLog@empty');
|
||||
|
Loading…
x
Reference in New Issue
Block a user