dsffsd
parent
f0747fa1b3
commit
fed97dbb88
|
@ -1030,8 +1030,10 @@ def api_sticky_post(post_id, v):
|
||||||
else: post.stickied = None
|
else: post.stickied = None
|
||||||
else:
|
else:
|
||||||
pins = g.db.query(Submission.id).filter(Submission.stickied != None, Submission.is_banned == False).count()
|
pins = g.db.query(Submission.id).filter(Submission.stickied != None, Submission.is_banned == False).count()
|
||||||
if pins > 2: return {"error": "Can't exceed 3 pinned posts limit!"}, 403
|
if pins > 2:
|
||||||
post.stickied = v.username
|
t = int(time.time()) + 3600
|
||||||
|
post.stickied = f"t:{t}"
|
||||||
|
else: post.stickied = v.username
|
||||||
g.db.add(post)
|
g.db.add(post)
|
||||||
|
|
||||||
ma=ModAction(
|
ma=ModAction(
|
||||||
|
|
Loading…
Reference in New Issue