diff options
author | ubq323 <ubq323> | 2021-06-10 00:20:09 +0000 |
---|---|---|
committer | ubq323 <ubq323> | 2021-06-10 00:20:09 +0000 |
commit | 5eaab761b37f6e880ccc6e743675d7e2ad59c1e4 (patch) | |
tree | 53f71d4e2ec724090be0898668d68caebb812b70 /apioforum/thread.py | |
parent | da82578b625dbe5c50d6ba228919cf7e0b585043 (diff) |
delete post template, fuzziness for timestamps etc
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'])) |