public IHttpActionResult GetEditedPost(string postId) { object jsonObject; PostDTO postDTO = postService.GetPost(postId); if (postDTO == null) { jsonObject = new { status = 500 }; } else { APIEditedPostModel editedPostModel = dataMapper.MapEditedPostDTOToModel(postDTO); jsonObject = new { status = 200, data = editedPostModel }; } return(Json(jsonObject)); }