public async Task <IActionResult> GetPosts(string topicName) { List <Post> posts = await topicObj.GetPostsAsync(topicName); if (posts.Any()) { return(Ok(posts)); } else { return(NotFound()); } }