Doc posts
This commit is contained in:
parent
a32f16e07e
commit
df55fe032c
|
@ -58,5 +58,8 @@ POST_DIR = "."
|
||||||
|
|
||||||
@api.route("/posts")
|
@api.route("/posts")
|
||||||
def posts_list():
|
def posts_list():
|
||||||
|
"""
|
||||||
|
Returns all .md files under POST_DIR
|
||||||
|
"""
|
||||||
posts = glob(f"{POST_DIR}/**/*.md", recursive=True)
|
posts = glob(f"{POST_DIR}/**/*.md", recursive=True)
|
||||||
return jsonify(posts)
|
return jsonify(posts)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user