Update middleware CheckAdministrator
This commit is contained in:
parent
fe5becf235
commit
8f3088bcb3
|
|
@ -2,13 +2,15 @@
|
||||||
|
|
||||||
namespace App\Http\Middleware;
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
|
|
||||||
class CheckAdministrator
|
class CheckAdministrator
|
||||||
{
|
{
|
||||||
public function handle($request, \Closure $next)
|
public function handle($request, \Closure $next)
|
||||||
{
|
{
|
||||||
$result = (new CheckAuthenticated)->handle($request, $next, true);
|
$result = (new CheckAuthenticated)->handle($request, $next, true);
|
||||||
|
|
||||||
if ($result instanceof \Illuminate\Http\RedirectResponse) {
|
if ($result instanceof Response) {
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user