Skip to content

Commit

Permalink
fix call
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Oct 23, 2019
1 parent 93eb836 commit 331c354
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Illuminate/Auth/Middleware/RequirePassword.php
Expand Up @@ -47,7 +47,9 @@ public function handle($request, Closure $next, $redirectToRoute = null)
{
if ($this->shouldConfirmPassword($request)) {
if ($request->expectsJson()) {
abort(423, 'Password confirmation required.');
return $this->responseFactory->json([
'message' => 'Password confirmation required.'
], 423);
}

return $this->responseFactory->redirectGuest(
Expand Down

0 comments on commit 331c354

Please sign in to comment.