public IActionResult Post(UserModel model) { try { var token = manager.Authenticate(model); if (!string.IsNullOrEmpty(token)) { return(Ok(token)); } else { return(Unauthorized()); } } catch (Exception ex) { return(NotFound(ex.Message)); } }