misc
This commit is contained in:
@ -45,14 +45,14 @@ class Misc(FastAPI):
|
||||
handler,
|
||||
methods=["GET"],
|
||||
include_in_schema=True,
|
||||
dependencies=[Depends(RateLimiter(times=2, seconds=5))],
|
||||
dependencies=[Depends(RateLimiter(times=10, seconds=2))],
|
||||
)
|
||||
|
||||
app.add_api_route(
|
||||
"/misc/upload_activity_image",
|
||||
self.upload_activity_image,
|
||||
methods=["POST"],
|
||||
dependencies=[Depends(RateLimiter(times=2, seconds=5))],
|
||||
dependencies=[Depends(RateLimiter(times=10, seconds=2))],
|
||||
)
|
||||
|
||||
logging.debug("Loading NaaS reasons")
|
||||
|
@ -50,7 +50,8 @@ class Radio(FastAPI):
|
||||
for endpoint, handler in self.endpoints.items():
|
||||
app.add_api_route(
|
||||
f"/{endpoint}", handler, methods=["POST"], include_in_schema=True,
|
||||
dependencies=[Depends(RateLimiter(times=10, seconds=5))],
|
||||
dependencies=[Depends(
|
||||
RateLimiter(times=10, seconds=2))] if not endpoint == "radio/np" else None,
|
||||
)
|
||||
|
||||
# NOTE: Not in loop because method is GET for this endpoint
|
||||
|
Reference in New Issue
Block a user