diff --git a/AllReadyApp/Web-App/AllReady/Controllers/MeApiController.cs b/AllReadyApp/Web-App/AllReady/Controllers/MeApiController.cs index f26c4e125..d2807218b 100644 --- a/AllReadyApp/Web-App/AllReady/Controllers/MeApiController.cs +++ b/AllReadyApp/Web-App/AllReady/Controllers/MeApiController.cs @@ -15,6 +15,10 @@ namespace AllReady.Controllers [Route("api/me")] public class MeApiController : Controller { + private const string INVALID_LOGIN = "Unable to validate login information"; + private const string TWO_FACTOR_NOT_SUPPORTED = "2 factor not supported yet!"; + private const string ACCOUNT_LOCKED_OUT = "Account is locked out. Please try again later"; + private readonly UserManager _userManager; private readonly SignInManager _signInManager; private readonly IMediator _mediator; @@ -35,7 +39,7 @@ public async Task Login([FromBody] LoginViewModel model) { if (!ModelState.IsValid) { - return BadRequest("Unable to valid login information"); + return BadRequest(INVALID_LOGIN); } // Require admin users to have a confirmed email before they can log on. @@ -61,17 +65,17 @@ public async Task Login([FromBody] LoginViewModel model) if (result.RequiresTwoFactor) { - return BadRequest("2 factor not supported yet!"); + return BadRequest(TWO_FACTOR_NOT_SUPPORTED); } if (result.IsLockedOut) { //return View("Lockout"); - return BadRequest("Account is locked out. Please try again later"); + return BadRequest(ACCOUNT_LOCKED_OUT); } return Unauthorized(); } } -} \ No newline at end of file +}