예제 #1
0
 public ActionResult AddPosts([FromBody] AddPostsToFeedRequest postsRequest)
 {
     if (postsRequest != null && _feedRepository.AddPosts(new Post
     {
         Text = postsRequest.Text,
         Image = postsRequest.Image,
         SourceUrl = postsRequest.SourceUrl,
         Date = postsRequest.Date,
         FeedId = Guid.Parse(postsRequest.FeedId)
     }))
     {
         return(Ok());
     }
     return(BadRequest());
 }