From a3f5910f2d29179b294a1450f24e873c13f6803c Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Fri, 20 Mar 2020 00:22:39 +0100 Subject: [PATCH] Adding easily parsable errors to the login and the register api --- Kyoo/Views/API/AccountAPI.cs | 2 +- Kyoo/Views/WebClient | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Kyoo/Views/API/AccountAPI.cs b/Kyoo/Views/API/AccountAPI.cs index facd48d3..1a33c40a 100644 --- a/Kyoo/Views/API/AccountAPI.cs +++ b/Kyoo/Views/API/AccountAPI.cs @@ -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(); } diff --git a/Kyoo/Views/WebClient b/Kyoo/Views/WebClient index 4d5b46ad..0112c08a 160000 --- a/Kyoo/Views/WebClient +++ b/Kyoo/Views/WebClient @@ -1 +1 @@ -Subproject commit 4d5b46ad07643e5524badc51ada3461b25e6d239 +Subproject commit 0112c08ae4bdee6bd7ed63a6cf09fc6e19ed8b2a