style: Laravel Pint 코드 포맷팅 적용
- PSR-12 스타일 가이드 준수 - 302개 파일 스타일 이슈 자동 수정 - 코드 로직 변경 없음 (포맷팅만)
This commit is contained in:
@@ -24,7 +24,6 @@ public function handle(Request $request, Closure $next)
|
||||
'headers' => $request->headers->all(),
|
||||
]);
|
||||
|
||||
|
||||
$apiKey = $request->header('X-API-KEY');
|
||||
|
||||
$validApiKey = false;
|
||||
@@ -37,13 +36,13 @@ public function handle(Request $request, Closure $next)
|
||||
->exists();
|
||||
}
|
||||
|
||||
if (!$validApiKey) {
|
||||
if (! $validApiKey) {
|
||||
return response()->json(['message' => 'Unauthorized. Invalid or missing API key'], 401);
|
||||
}
|
||||
|
||||
// Bearer 인증 (Sanctum)
|
||||
$user = [];
|
||||
if($token = $request->bearerToken()) {
|
||||
if ($token = $request->bearerToken()) {
|
||||
$accessToken = PersonalAccessToken::findToken($token);
|
||||
if ($accessToken && $accessToken->tokenable instanceof User) {
|
||||
$user = $accessToken->tokenable;
|
||||
@@ -79,9 +78,9 @@ public function handle(Request $request, Closure $next)
|
||||
// 현재 라우트 확인 (경로 또는 이름)
|
||||
$currentRoute = $request->route()->uri(); // 또는 $request->path()
|
||||
|
||||
if (!in_array($currentRoute, $allowWithoutAuth)) {
|
||||
if (! in_array($currentRoute, $allowWithoutAuth)) {
|
||||
// 인증정보(api_user, tenant_id) 없으면 튕김
|
||||
if (!app()->bound('api_user')) {
|
||||
if (! app()->bound('api_user')) {
|
||||
throw new AuthenticationException('회원정보 정보 없음');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user