public IActionResult ApproveInfo(int id) { ServiceResult result = SubjectService.ApproveSubjectInfo(id); if (result.Result == Result.NotFound) { return(NotFound()); } if (result.Result != Result.OK) { return(BadRequest()); } bool subjectApproved = SubjectService.IsSubjectApproved(result.Id); return(Ok(new { infoApproved = true, subjectApproved })); }