forked from rDrama/rDrama
remove edit ratelimit since they cant edit shit older than 1 week anyway
parent
5c56b9a20b
commit
d3f04d5731
|
@ -56,7 +56,7 @@ class Service(Enum):
|
|||
|
||||
DEFAULT_RATELIMIT = "30/minute;200/hour;1000/day"
|
||||
CASINO_RATELIMIT = "100/minute;5000/hour;20000/day"
|
||||
DELETE_EDIT_RATELIMIT = "10/minute;50/day"
|
||||
DELETE_RATELIMIT = "10/minute;50/day"
|
||||
|
||||
PUSH_NOTIF_LIMIT = 1000
|
||||
|
||||
|
|
|
@ -431,8 +431,8 @@ def comment(v):
|
|||
@app.post("/delete/comment/<int:cid>")
|
||||
@limiter.limit('1/second', scope=rpath)
|
||||
@limiter.limit('1/second', scope=rpath, key_func=get_ID)
|
||||
@limiter.limit(DELETE_EDIT_RATELIMIT, deduct_when=lambda response: response.status_code < 400)
|
||||
@limiter.limit(DELETE_EDIT_RATELIMIT, deduct_when=lambda response: response.status_code < 400, key_func=get_ID)
|
||||
@limiter.limit(DELETE_RATELIMIT, deduct_when=lambda response: response.status_code < 400)
|
||||
@limiter.limit(DELETE_RATELIMIT, deduct_when=lambda response: response.status_code < 400, key_func=get_ID)
|
||||
@auth_required
|
||||
def delete_comment(cid, v):
|
||||
if SITE == 'rdrama.net' and v.id == 253:
|
||||
|
@ -639,8 +639,8 @@ def toggle_comment_nsfw(cid, v):
|
|||
@app.post("/edit_comment/<int:cid>")
|
||||
@limiter.limit('1/second', scope=rpath)
|
||||
@limiter.limit('1/second', scope=rpath, key_func=get_ID)
|
||||
@limiter.limit(DELETE_EDIT_RATELIMIT, deduct_when=lambda response: response.status_code < 400)
|
||||
@limiter.limit(DELETE_EDIT_RATELIMIT, deduct_when=lambda response: response.status_code < 400, key_func=get_ID)
|
||||
@limiter.limit(DEFAULT_RATELIMIT, deduct_when=lambda response: response.status_code < 400)
|
||||
@limiter.limit(DEFAULT_RATELIMIT, deduct_when=lambda response: response.status_code < 400, key_func=get_ID)
|
||||
@auth_required
|
||||
def edit_comment(cid, v):
|
||||
c = get_comment(cid, v=v)
|
||||
|
|
|
@ -710,8 +710,8 @@ def submit_post(v, hole=None):
|
|||
@app.post("/delete/post/<int:pid>")
|
||||
@limiter.limit('1/second', scope=rpath)
|
||||
@limiter.limit('1/second', scope=rpath, key_func=get_ID)
|
||||
@limiter.limit(DELETE_EDIT_RATELIMIT, deduct_when=lambda response: response.status_code < 400)
|
||||
@limiter.limit(DELETE_EDIT_RATELIMIT, deduct_when=lambda response: response.status_code < 400, key_func=get_ID)
|
||||
@limiter.limit(DELETE_RATELIMIT, deduct_when=lambda response: response.status_code < 400)
|
||||
@limiter.limit(DELETE_RATELIMIT, deduct_when=lambda response: response.status_code < 400, key_func=get_ID)
|
||||
@auth_required
|
||||
def delete_post_pid(pid, v):
|
||||
p = get_post(pid)
|
||||
|
@ -975,8 +975,8 @@ def get_post_title(v):
|
|||
@app.post("/edit_post/<int:pid>")
|
||||
@limiter.limit('1/second', scope=rpath)
|
||||
@limiter.limit('1/second', scope=rpath, key_func=get_ID)
|
||||
@limiter.limit(DELETE_EDIT_RATELIMIT, deduct_when=lambda response: response.status_code < 400)
|
||||
@limiter.limit(DELETE_EDIT_RATELIMIT, deduct_when=lambda response: response.status_code < 400, key_func=get_ID)
|
||||
@limiter.limit(DEFAULT_RATELIMIT, deduct_when=lambda response: response.status_code < 400)
|
||||
@limiter.limit(DEFAULT_RATELIMIT, deduct_when=lambda response: response.status_code < 400, key_func=get_ID)
|
||||
@auth_required
|
||||
def edit_post(pid, v):
|
||||
p = get_post(pid)
|
||||
|
|
Loading…
Reference in New Issue