diff options
Diffstat (limited to 'apioforum/thread.py')
-rw-r--r-- | apioforum/thread.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apioforum/thread.py b/apioforum/thread.py index d64055a..b9697ce 100644 --- a/apioforum/thread.py +++ b/apioforum/thread.py @@ -96,7 +96,8 @@ def edit_post(post_id): print(err) if err is None: print("a") - db.execute("UPDATE posts SET content = ? WHERE id = ?",(newcontent,post_id)) + db.execute( + "UPDATE posts SET content = ?, edited = 1, updated = current_timestamp WHERE id = ?",(newcontent,post_id)) db.commit() flash("post edited editiously") return redirect(url_for("thread.view_thread",thread_id=post['thread'])) |