update api

This commit is contained in:
Tokumeikoi 2020-02-11 21:06:15 +08:00
parent e14489cf66
commit c82acafdf8

View File

@ -16,7 +16,7 @@ class User
public function handle($request, Closure $next)
{
if ($request->input('access_token')) {
$user = \App\Models\User::where('token', $request->input('token'))->first();
$user = \App\Models\User::where('token', $request->input('access_token'))->first();
if ($user) {
$request->session()->put('email', $user->email);
$request->session()->put('id', $user->id);