forked from rDrama/rDrama
remove unnecessary check
parent
2b81c4b03c
commit
33878fcd02
|
@ -1320,7 +1320,6 @@ def unsticky_post(post_id, v):
|
||||||
@app.post("/sticky_comment/<cid>")
|
@app.post("/sticky_comment/<cid>")
|
||||||
@admin_level_required(PERMS['POST_COMMENT_MODERATION'])
|
@admin_level_required(PERMS['POST_COMMENT_MODERATION'])
|
||||||
def sticky_comment(cid, v):
|
def sticky_comment(cid, v):
|
||||||
|
|
||||||
comment = get_comment(cid, v=v)
|
comment = get_comment(cid, v=v)
|
||||||
|
|
||||||
if not comment.stickied:
|
if not comment.stickied:
|
||||||
|
@ -1390,9 +1389,7 @@ def remove_comment(c_id, v):
|
||||||
@limiter.limit(DEFAULT_RATELIMIT_SLOWER)
|
@limiter.limit(DEFAULT_RATELIMIT_SLOWER)
|
||||||
@admin_level_required(PERMS['POST_COMMENT_MODERATION'])
|
@admin_level_required(PERMS['POST_COMMENT_MODERATION'])
|
||||||
def approve_comment(c_id, v):
|
def approve_comment(c_id, v):
|
||||||
|
|
||||||
comment = get_comment(c_id)
|
comment = get_comment(c_id)
|
||||||
if not comment: abort(404)
|
|
||||||
|
|
||||||
if comment.author.id == v.id and comment.author.agendaposter and AGENDAPOSTER_PHRASE not in comment.body.lower() and comment.post.sub != 'chudrama':
|
if comment.author.id == v.id and comment.author.agendaposter and AGENDAPOSTER_PHRASE not in comment.body.lower() and comment.post.sub != 'chudrama':
|
||||||
abort(400, "You can't bypass the chud award!")
|
abort(400, "You can't bypass the chud award!")
|
||||||
|
@ -1417,8 +1414,6 @@ def approve_comment(c_id, v):
|
||||||
@app.post("/distinguish_comment/<c_id>")
|
@app.post("/distinguish_comment/<c_id>")
|
||||||
@admin_level_required(PERMS['POST_COMMENT_DISTINGUISH'])
|
@admin_level_required(PERMS['POST_COMMENT_DISTINGUISH'])
|
||||||
def admin_distinguish_comment(c_id, v):
|
def admin_distinguish_comment(c_id, v):
|
||||||
|
|
||||||
|
|
||||||
comment = get_comment(c_id, v=v)
|
comment = get_comment(c_id, v=v)
|
||||||
|
|
||||||
if comment.distinguish_level:
|
if comment.distinguish_level:
|
||||||
|
|
Loading…
Reference in New Issue