Doc posts

master
Peppuz 2018-04-24 18:20:47 +02:00
parent a32f16e07e
commit df55fe032c
1 changed files with 3 additions and 0 deletions

View File

@ -58,5 +58,8 @@ POST_DIR = "."
@api.route("/posts")
def posts_list():
"""
Returns all .md files under POST_DIR
"""
posts = glob(f"{POST_DIR}/**/*.md", recursive=True)
return jsonify(posts)