public IActionResult Post(Organization model) { if (ModelState.IsValid) { if (!_srv.CheckOrgExists(model.Name)) { Organization org = new Organization() { Name = model.Name, Password = model.Password, Email = model.Email }; if (_srv.PostOrg(org)) { return(Ok()); } return(BadRequest("Posting organization failed!")); } return(BadRequest($"Organization with name \"{model.Name}\" already exists!")); } return(BadRequest("Organization model is invalid!")); }