Example #1
0
def api_author_posts(author_name):
    posts = Post.get_posts_by_author_name(author_name)
    posts = map(lambda post: dump_post(post), posts)
    posts = list(posts)
    return ok({
        'author_name': author_name,
        'posts': posts,
    })