we can chat now?
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Simple_Not
2023-07-19 00:28:45 +10:00
parent 586b76bc25
commit 7f94bade46
4 changed files with 50 additions and 34 deletions

16
app.py
View File

@@ -63,6 +63,22 @@ def page_posts_from_db(target_post_id=None):
return render_template("interactive-posts.html", host_id=docker_short_id, postos=postos, target_post_id=target_post_id)
@app.route("/answer_post/<target_post_id>")
def page_posts_from_db(target_post_id):
postos = db.collection('posts')
postos = [ p for p in postos]
postos = sorted(postos, key=lambda posto: posto['_key'], reverse=False)
if not target_post_id:
target_post_id = postos[0]['_key']
return render_template("answer-post.html", target_post_id=target_post_id)
@app.route('/post_my_post/<post_key>', methods=['POST'])
def post_a_post(post_key):