Adding easily parsable errors to the login and the register api

This commit is contained in:
Zoe Roux 2020-03-20 00:22:39 +01:00
parent e25e1276e4
commit a3f5910f2d
2 changed files with 2 additions and 2 deletions

View File

@ -77,7 +77,7 @@ namespace Kyoo.Api
return BadRequest(login);
SignInResult result = await _signInManager.PasswordSignInAsync(login.Username, login.Password, login.StayLoggedIn, false);
if (!result.Succeeded)
return BadRequest("Invalid username/password");
return BadRequest(new [] { new {code = "InvalidCredentials", description = "Invalid username/password"}});
return Ok();
}

@ -1 +1 @@
Subproject commit 4d5b46ad07643e5524badc51ada3461b25e6d239
Subproject commit 0112c08ae4bdee6bd7ed63a6cf09fc6e19ed8b2a