Beispiel #1
0
        public IActionResult GetCommentsByPost([FromRoute] int id, [FromQuery] string lang)
        {
            List <Core.Entities.Comment> comments = postsManager.GetComments(id);
            List <Comment> result = comments.ConvertAll(comment => mapper.Map <Comment>(comment));

            return(Ok(result));
        }
Beispiel #2
0
 public IActionResult GetComments(int id)
 {
     return(Ok(_postManager.GetComments(id)));
 }