fix admin login

This commit is contained in:
Tokumeikoi 2020-02-16 13:48:31 +08:00
parent ace06630d8
commit 19940f599d

View File

@ -175,9 +175,13 @@ class AuthController extends Controller
public function check(Request $request) public function check(Request $request)
{ {
return response([ $response = [
'data' => $request->session()->get('id') ? true : false 'data' => $request->session()->get('id') ? true : false
]); ];
if ($request->session()->get('is_admin')) {
$response['is_admin'] = true;
}
return response($response);
} }
public function forget(AuthForget $request) public function forget(AuthForget $request)