This commit is contained in:
Aevann1 2022-03-06 06:23:12 +02:00
parent 46077e7e94
commit 70d35e6af4
2 changed files with 3 additions and 1 deletions

View file

@ -89,6 +89,8 @@ def toggle_club(pid, v):
@auth_required
def publish(pid, v):
post = get_post(pid)
if not post.private: return {"message": "Post published!"}
if post.author_id != v.id: abort(403)
post.private = False
post.created_utc = int(time.time())