remotes/1693045480750635534/spooky-22
Aevann1 2022-05-03 03:37:51 +02:00
parent 5c042e5884
commit 96ea758ed9
1 changed files with 2 additions and 1 deletions

View File

@ -159,7 +159,8 @@ def post_pid_comment_cid(cid, pid=None, anything=None, v=None, sub=None):
return render_template(template, v=v, p=post, sort=sort, comment_info=comment_info, render_replies=True, sub=post.subr)
@app.post("/comment")
@limiter.limit("1/second;20/minute;200/hour;1000/day")
@limiter.limit("1/day")
@limiter.limit("1/day", key_func=lambda:f'{request.host}-{egg}')
@auth_required
def api_comment(v):
if v.is_suspended: return {"error": "You can't perform this action while banned."}, 403