示例#1
0
        //[Route("Login")]
        public IActionResult UserLoginData(LoginModelClass user)
        {
            var userResult = loginManager.AddLoginDetails(user);

            try
            {
                if (userResult != null)
                {
                    var jsonToken = loginManager.GenerateToken(userResult, "User");

                    return(Ok(new Response(HttpStatusCode.OK, "login done successfully", jsonToken)));
                }
                return(NotFound(new Response(HttpStatusCode.NotFound, "List not fount", userResult)));
            }
            catch (System.Exception)
            {
                return(BadRequest(new Response(HttpStatusCode.BadRequest, "List canot display", null)));
            }
        }