Ejemplo n.º 1
0
        public async Task <IActionResult> Authenticate([FromBody] User userParam)
        {
            User user = await _loginuserobj.AuthenticateUser(userParam);

            if (user == null)
            {
                return(BadRequest(new { message = "Username or password is incorrect" }));
            }

            return(Ok(user));
        }