public IActionResult AddProjectFunder([FromBody] ProjectFunderModel model) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } string userIdVal = User.FindFirst(ClaimTypes.NameIdentifier)?.Value; int userId = 0; if (!string.IsNullOrEmpty(userIdVal)) { userId = Convert.ToInt32(userIdVal); } if (userId == 0) { return(BadRequest("Unauthorized user access to api")); } int organizationId = 0; var organizationIdVal = User.FindFirst(ClaimTypes.Country)?.Value; if (!string.IsNullOrEmpty(organizationIdVal)) { organizationId = Convert.ToInt32(organizationIdVal); } model.ProjectUrl = projectUrl; var response = projectService.AddProjectFunder(model, organizationId, userId); if (!response.Success) { return(BadRequest(response.Message)); } return(Ok(response)); }