diff --git a/FrontendWebApi/Controllers/LoginController.cs b/FrontendWebApi/Controllers/LoginController.cs index 2980af9..8b73555 100644 --- a/FrontendWebApi/Controllers/LoginController.cs +++ b/FrontendWebApi/Controllers/LoginController.cs @@ -53,7 +53,7 @@ namespace FrontendWebApi.Controllers [HttpPost] [Route("api/Login")] - public async Task>> Login(Login login) + public async Task>> Login([FromBody] Login login) { ApiResult apiResult = new ApiResult(null); ErrorCode errorCode = new ErrorCode(); @@ -67,6 +67,7 @@ namespace FrontendWebApi.Controllers if (User == null) { apiResult.Code = "9998"; + apiResult.Msg = "查無此帳戶"; return Ok(apiResult); } JwtLogin jwtLoing = new JwtLogin() @@ -77,6 +78,7 @@ namespace FrontendWebApi.Controllers userinfo_guid = User.userinfo_guid }; apiResult.Code = "0000"; + apiResult.Msg = "登入成功"; apiResult.Data = jwt.GenerateToken(jwtLoing); } catch diff --git a/FrontendWebApi/Models/User.cs b/FrontendWebApi/Models/User.cs index d3a9135..5b6426c 100644 --- a/FrontendWebApi/Models/User.cs +++ b/FrontendWebApi/Models/User.cs @@ -19,6 +19,6 @@ namespace FrontendWebApi.Models public class Login { public string account { get; set; } - //public string password { get; set; } + public string password { get; set; } } }