update:优化登录

This commit is contained in:
JaguarJack
2020-09-22 11:13:53 +08:00
parent 08b3e472a9
commit 42e6cd36aa
2 changed files with 1 additions and 33 deletions

View File

@@ -23,10 +23,8 @@ class Index extends CatchController
public function login(LoginRequest $request, CatchAuth $auth)
{
try {
$params = $request->param();
$token = $auth->attempt($params);
return CatchResponse::success([
'token' => $token,
'token' => $auth->attempt($request->param()),
], '登录成功');
} catch (\Exception $exception) {
$code = $exception->getCode();