temporarily relax ratelimit

pull/227/head
Aevann 2024-05-22 18:21:10 +03:00
parent c494f0b1f2
commit 08f2a8a635
1 changed files with 2 additions and 2 deletions

View File

@ -112,8 +112,8 @@ def report_comment(cid, v):
@app.post('/del_report/post/<int:pid>/<int:uid>')
@limiter.limit('1/second', scope=rpath)
@limiter.limit('1/second', scope=rpath, key_func=get_ID)
@limiter.limit("100/minute;300/hour;2000/day", deduct_when=lambda response: response.status_code < 400)
@limiter.limit("100/minute;300/hour;2000/day", deduct_when=lambda response: response.status_code < 400, key_func=get_ID)
@limiter.limit("99999/day", deduct_when=lambda response: response.status_code < 400)
@limiter.limit("99999/day", deduct_when=lambda response: response.status_code < 400, key_func=get_ID)
@auth_required
def remove_report_post(v, pid, uid):
report = g.db.query(Report).filter_by(post_id=pid, user_id=uid).one_or_none()