fix admin login

This commit is contained in:
Tokumeikoi 2020-02-16 13:52:15 +08:00
parent 19940f599d
commit edf88cbccf

View File

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