Commit 23cc411c authored by Joseph Silber's avatar Joseph Silber

Use App::abort instead of Response::make

parent cf36bb47
...@@ -37,10 +37,7 @@ Route::filter('auth', function() ...@@ -37,10 +37,7 @@ Route::filter('auth', function()
{ {
if (Auth::guest()) if (Auth::guest())
{ {
if (Request::ajax()) if (Request::ajax()) App::abort(401);
{
return Response::make('', 401, array('HTTP/1.1 401 Unauthorized'));
}
return Redirect::guest('login'); return Redirect::guest('login');
} }
......
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