ratelimit /delete_media and notify me of its usage

pull/137/head
Aevann 2023-03-09 22:50:12 +02:00
parent 053380e512
commit 514b7bfa7f
2 changed files with 4 additions and 3 deletions

View File

@ -408,4 +408,5 @@ MODACTION_TYPES__FILTERED = deepcopy({t:v for t,v in MODACTION_TYPES.items()
AEVANN_MODACTION_TYPES = {'ban_user','unban_user',
'shadowban','unshadowban',
'progstack_post','progstack_comment',
'unprogstack_post', 'unprogstack_comment'}
'unprogstack_post', 'unprogstack_comment',
'delete_media'}

View File

@ -1754,8 +1754,8 @@ def delete_media_get(v):
@app.post("/admin/delete_media")
@limiter.limit('1/second', scope=rpath)
@limiter.limit(DEFAULT_RATELIMIT)
@limiter.limit(DEFAULT_RATELIMIT, key_func=get_ID)
@limiter.limit("50/day")
@limiter.limit("50/day", key_func=get_ID)
@admin_level_required(PERMS['DELETE_MEDIA'])
def delete_media_post(v):