force status codes to be returned

This commit is contained in:
David Bomba 2019-09-10 19:31:51 +10:00
parent 1f624e28bc
commit 1c2ba3a53e

View File

@ -93,7 +93,7 @@ class LoginController extends BaseController
if ($this->hasTooManyLoginAttempts($request)) { if ($this->hasTooManyLoginAttempts($request)) {
$this->fireLockoutEvent($request); $this->fireLockoutEvent($request);
return response()->json(['message' => 'Too many login attempts, you are being throttled']); return response()->json(['message' => 'Too many login attempts, you are being throttled'], 401);
} }
if ($this->attemptLogin($request)) if ($this->attemptLogin($request))
@ -102,7 +102,7 @@ class LoginController extends BaseController
$this->incrementLoginAttempts($request); $this->incrementLoginAttempts($request);
return response()->json(['message' => ctrans('texts.invalid_credentials')]); return response()->json(['message' => ctrans('texts.invalid_credentials')], 401);
} }
} }