This commit is contained in:
root 2019-12-02 16:46:09 +08:00
parent 2c4400e3f9
commit e7618018f6
2 changed files with 7 additions and 5 deletions

View File

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

2
public/umi.js vendored

File diff suppressed because one or more lines are too long