public IActionResult Authenticate([FromBody] Authenticate model) { var user = _userBusiness.Authenticate(model.Username, model.Password); if (user == null) { return(BadRequest(new { message = "Username or password is incorrect" })); } return(Ok(user)); }