forked from MarseyWorld/MarseyWorld
fsd
parent
ceaceffcd6
commit
4c2f7d5667
|
@ -261,7 +261,8 @@ def post_id(pid, anything=None, v=None, sub=None):
|
||||||
@limiter.limit("1/second;30/minute;200/hour;1000/day")
|
@limiter.limit("1/second;30/minute;200/hour;1000/day")
|
||||||
@auth_desired
|
@auth_desired
|
||||||
def viewmore(v, pid, sort, offset):
|
def viewmore(v, pid, sort, offset):
|
||||||
pid = int(pid)
|
try: pid = int(pid)
|
||||||
|
except: abort(400)
|
||||||
post = get_post(pid, v=v)
|
post = get_post(pid, v=v)
|
||||||
if post.club and not (v and (v.paid_dues or v.id == post.author_id)): abort(403)
|
if post.club and not (v and (v.paid_dues or v.id == post.author_id)): abort(403)
|
||||||
|
|
||||||
|
|
|
@ -70,10 +70,12 @@ def api_flag_comment(cid, v):
|
||||||
@limiter.limit("1/second;30/minute;200/hour;1000/day")
|
@limiter.limit("1/second;30/minute;200/hour;1000/day")
|
||||||
@admin_level_required(2)
|
@admin_level_required(2)
|
||||||
def remove_report_post(v, pid, uid):
|
def remove_report_post(v, pid, uid):
|
||||||
|
|
||||||
pid = int(pid)
|
try:
|
||||||
uid = int(uid)
|
pid = int(pid)
|
||||||
|
uid = int(uid)
|
||||||
|
except: abort(400)
|
||||||
|
|
||||||
report = g.db.query(Flag).filter_by(post_id=pid, user_id=uid).one()
|
report = g.db.query(Flag).filter_by(post_id=pid, user_id=uid).one()
|
||||||
|
|
||||||
g.db.delete(report)
|
g.db.delete(report)
|
||||||
|
|
Loading…
Reference in New Issue