diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php index 03bc6807..00c16382 100644 --- a/app/Http/Middleware/Authenticate.php +++ b/app/Http/Middleware/Authenticate.php @@ -21,21 +21,21 @@ class Authenticate extends Middleware } } - public function handle($request, Closure $next, ...$guards) - { - // Kalau tidak ada guard dikirim dari route - if (empty($guards)) { - $guards = [null]; - } + // public function handle($request, Closure $next, ...$guards) + // { + // // Kalau tidak ada guard dikirim dari route + // if (empty($guards)) { + // $guards = [null]; + // } - foreach ($guards as $guard) { - if (Auth::guard($guard)->check()) { - return $next($request); - } - } + // foreach ($guards as $guard) { + // if (Auth::guard($guard)->check()) { + // return $next($request); + // } + // } - return response()->json([ - 'error' => 'Unauthorized' - ], 401); - } + // return response()->json([ + // 'error' => 'Unauthorized' + // ], 401); + // } }