This commit is contained in:
root 2019-11-18 20:26:35 +08:00
parent c373becd78
commit 2ae0600431

View File

@ -27,11 +27,8 @@ class LoginController extends Controller
$request->session()->put('is_admin', true);
}
$res = [
'data' => true
'data' => $user->is_admin ? 2 : 1
];
if ($user->is_admin) {
$res['is_admin'] = true;
}
return response($res);
}
}