Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

Commit

Permalink
Update UserController.php
Browse files Browse the repository at this point in the history
  • Loading branch information
PAXANDDOS committed Oct 19, 2021
1 parent 6678342 commit c54f8cb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/Http/Controllers/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,15 @@ public function updateMe(UpdateUserRequest $request)
'name' => $user->name,
'email' => $user->email,
'image' => $user->image,
'token' => "Bearer " . $request->header('Authorization'),
'token' => $request->header('Authorization'),
'ttl' => JWTAuth::factory()->getTTL() * 60
])
])->withCookie(cookie('user', json_encode([
'id' => $user->id,
'name' => $user->name,
'email' => $user->email,
'image' => $user->image,
'token' => "Bearer " . $request->header('Authorization')
'token' => $request->header('Authorization')
]), JWTAuth::factory()->getTTL()));
}

Expand All @@ -116,7 +116,7 @@ public function uploadAvatar(UploadAvatarRequest $request)
'name' => $user->name,
'email' => $user->email,
'image' => $image,
'token' => "Bearer " . $request->header('Authorization'),
'token' => $request->header('Authorization'),
'ttl' => JWTAuth::factory()->getTTL() * 60
])
], 201)->withCookie(cookie('user', json_encode([
Expand Down

0 comments on commit c54f8cb

Please sign in to comment.