mirror of
https://github.com/suitenumerique/meet.git
synced 2026-08-21 07:36:43 +00:00
♻️(backend) extract throttling classes into a module
Extract throttling classes into a dedicated Python module, following the structure of suitenumerique/docs. This is a preparatory refactor to ease upcoming changes to the throttling implementation. No functional behavior change is introduced in this commit.
This commit is contained in:
committed by
aleb_the_flash
parent
3887255e9c
commit
23de7e52bc
@@ -0,0 +1,14 @@
|
||||
"""Throttling modules for the API."""
|
||||
|
||||
from rest_framework import throttling
|
||||
|
||||
class RequestEntryAnonRateThrottle(throttling.AnonRateThrottle):
|
||||
"""Throttle Anonymous user requesting room entry"""
|
||||
|
||||
scope = "request_entry"
|
||||
|
||||
|
||||
class CreationCallbackAnonRateThrottle(throttling.AnonRateThrottle):
|
||||
"""Throttle Anonymous user requesting room generation callback"""
|
||||
|
||||
scope = "creation_callback"
|
||||
Reference in New Issue
Block a user