Skip to content

Commit

Permalink
make authenticate error same as with baseController
Browse files Browse the repository at this point in the history
  • Loading branch information
rafal-kucharski committed Aug 20, 2019
1 parent 6356bd8 commit 3795668
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Http/Middleware/Authenticate.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Authenticate extends Middleware
public function handle($request, Closure $next, ...$guards)
{
if ($this->authenticate($request, $guards) === 'authentication_failed') {
return response()->json(['error'=>'Unauthorized'],400);
return response()->json(['success' => false, 'message' => 'Unauthorized'], 400);
}
return $next($request);
}
Expand Down

0 comments on commit 3795668

Please sign in to comment.