Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
43 | public function handle($request, Closure $next, $guard = null) |
||
44 | { |
||
45 | if ($this->auth->guard($guard)->guest()) { |
||
46 | $response = [ |
||
47 | 'isError' => true, |
||
48 | 'userFault' => true, |
||
49 | 'errorMessages' => ['authorization' => TranslationCode::ERROR_UNAUTHORIZED] |
||
50 | ]; |
||
51 | |||
52 | return response()->json($response); |
||
53 | } |
||
54 | |||
55 | return $next($request); |
||
56 | } |
||
58 |