Unverified Commit 40643c43 authored by Viral Solani's avatar Viral Solani Committed by GitHub

Merge pull request #160 from viralsolani/analysis-qoOmbg

Apply fixes from StyleCI
parents 341ff697 a9a8b217
......@@ -2,13 +2,12 @@
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\Http\Resources\UserResource;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash;
use JWTAuth;
use Tymon\JWTAuth\Exceptions\JWTException;
use Validator;
class AuthController extends APIController
{
......@@ -19,7 +18,6 @@ class AuthController extends APIController
*
* @return \Illuminate\Http\JsonResponse
*/
public function login(Request $request)
{
$validation = Validator::make($request->all(), [
......@@ -40,7 +38,7 @@ class AuthController extends APIController
}
try {
$customClaims = [
$customClaims = [
'id' => $user->id,
'first_name' => $user->first_name,
'last_name' => $user->last_name,
......@@ -50,9 +48,9 @@ class AuthController extends APIController
'last_updated_at' => $user->updated_at->toIso8601String(),
];
$token = JWTAuth::fromUser($user, $customClaims);
$token = JWTAuth::fromUser($user, $customClaims);
} catch (JWTException $e) {
return $this->respondInternalError($e->getMessage());
return $this->respondInternalError($e->getMessage());
}
return $this->respond([
......@@ -61,7 +59,6 @@ class AuthController extends APIController
]);
}
/*public function login(Request $request)
{
$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