Commit a9a8b217 authored by Viral Solani's avatar Viral Solani Committed by StyleCI Bot

Apply fixes from StyleCI

parent 341ff697
...@@ -2,13 +2,12 @@ ...@@ -2,13 +2,12 @@
namespace App\Http\Controllers\Api\V1; namespace App\Http\Controllers\Api\V1;
use JWTAuth;
use Illuminate\Support\Facades\Hash;
use Validator;
use Illuminate\Http\Request;
use App\Models\Access\User\User; use App\Models\Access\User\User;
use App\Http\Resources\UserResource; use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash;
use JWTAuth;
use Tymon\JWTAuth\Exceptions\JWTException; use Tymon\JWTAuth\Exceptions\JWTException;
use Validator;
class AuthController extends APIController class AuthController extends APIController
{ {
...@@ -19,7 +18,6 @@ class AuthController extends APIController ...@@ -19,7 +18,6 @@ class AuthController extends APIController
* *
* @return \Illuminate\Http\JsonResponse * @return \Illuminate\Http\JsonResponse
*/ */
public function login(Request $request) public function login(Request $request)
{ {
$validation = Validator::make($request->all(), [ $validation = Validator::make($request->all(), [
...@@ -40,7 +38,7 @@ class AuthController extends APIController ...@@ -40,7 +38,7 @@ class AuthController extends APIController
} }
try { try {
$customClaims = [ $customClaims = [
'id' => $user->id, 'id' => $user->id,
'first_name' => $user->first_name, 'first_name' => $user->first_name,
'last_name' => $user->last_name, 'last_name' => $user->last_name,
...@@ -50,9 +48,9 @@ class AuthController extends APIController ...@@ -50,9 +48,9 @@ class AuthController extends APIController
'last_updated_at' => $user->updated_at->toIso8601String(), 'last_updated_at' => $user->updated_at->toIso8601String(),
]; ];
$token = JWTAuth::fromUser($user, $customClaims); $token = JWTAuth::fromUser($user, $customClaims);
} catch (JWTException $e) { } catch (JWTException $e) {
return $this->respondInternalError($e->getMessage()); return $this->respondInternalError($e->getMessage());
} }
return $this->respond([ return $this->respond([
...@@ -61,7 +59,6 @@ class AuthController extends APIController ...@@ -61,7 +59,6 @@ class AuthController extends APIController
]); ]);
} }
/*public function login(Request $request) /*public function login(Request $request)
{ {
$validation = Validator::make($request->all(), [ $validation = Validator::make($request->all(), [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment