forked from rDrama/rDrama
1
0
Fork 0

add lines

master
Aevann 2024-02-15 19:25:57 +02:00
parent 5282126293
commit 631007a7f7
1 changed files with 2 additions and 0 deletions

View File

@ -53,9 +53,11 @@ def _add_post_view(pid):
@is_not_banned
def publish(pid, v):
p = get_post(pid)
if not p.private: return {"message": "Post published!"}
if p.author_id != v.id: abort(403)
p.private = False
p.created_utc = int(time.time())
g.db.add(p)