From 6e1f0652711613c638345f3abb914de2cf369a7f Mon Sep 17 00:00:00 2001 From: Argo-MacBookPro Date: Thu, 18 Oct 2018 11:16:02 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84=E4=BB=A3=E7=A0=81=EF=BC=9A?= =?UTF-8?q?=E6=9B=B4=E6=94=B9api/Login=E8=BF=94=E5=9B=9E=E5=80=BC=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bootstrap.Admin/Controllers/Api/LoginController.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Bootstrap.Admin/Controllers/Api/LoginController.cs b/Bootstrap.Admin/Controllers/Api/LoginController.cs index 8b369aac..1516ed8d 100644 --- a/Bootstrap.Admin/Controllers/Api/LoginController.cs +++ b/Bootstrap.Admin/Controllers/Api/LoginController.cs @@ -21,17 +21,16 @@ namespace Bootstrap.Admin.Controllers.Api /// [AllowAnonymous] [HttpPost] - public ActionResult Post([FromBody]JObject value) + public string Post([FromBody]JObject value) { dynamic user = value; string userName = user.userName; string password = user.password; if (BootstrapUser.Authenticate(userName, password)) { - var token = BootstrapAdminJwtTokenHandler.CreateToken(userName); - return new JsonResult(new { token }); + return BootstrapAdminJwtTokenHandler.CreateToken(userName); } - return new NoContentResult(); + return null; } /// ///