diff options
| author | Dennis Fink | 2026-11-12 22:56:07 +0100 |
|---|---|---|
| committer | Dennis Fink | 2026-11-12 22:56:07 +0100 |
| commit | a10b29ac98ba535a5c2f9697c54265edd2c84a78 (patch) | |
| tree | f116a58be6e241a11d283683070ebb18c96aa8e4 /webmentions_ssg/views/endpoint.py | |
| parent | 1db6b47f88dde5538efa433328987c70eab74d70 (diff) | |
| download | webmentions-ssg-a10b29ac98ba535a5c2f9697c54265edd2c84a78.tar.gz webmentions-ssg-a10b29ac98ba535a5c2f9697c54265edd2c84a78.zip | |
refactor(core): use lowercase extension names
Rename shared Flask extension singletons to conventional lowercase names
and update imports throughout the application and tests to remove
redundant aliases.
Diffstat (limited to '')
| -rw-r--r-- | webmentions_ssg/views/endpoint.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/webmentions_ssg/views/endpoint.py b/webmentions_ssg/views/endpoint.py index baab397..91bb881 100644 --- a/webmentions_ssg/views/endpoint.py +++ b/webmentions_ssg/views/endpoint.py @@ -15,8 +15,7 @@ from flask.typing import ResponseReturnValue from sqlalchemy.engine import CursorResult from .. import forms -from ..extensions import CSRF, LIMITER -from ..extensions import DATABASE as db +from ..extensions import csrf, db, limiter from ..models import ReceivedWebmention, received_url_digest from ..tasks.receiver import verify_webmention from . import root_page @@ -92,12 +91,12 @@ def submit_received(source: str, target: str) -> tuple[uuid.UUID, bool] | None: @root_page.post("/endpoint") -@LIMITER.limit( +@limiter.limit( lambda: current_app.config["ENDPOINT_GLOBAL_RATE_LIMIT"], key_func=lambda: "all-clients", ) -@LIMITER.limit(lambda: current_app.config["ENDPOINT_RATE_LIMIT"]) -@CSRF.exempt +@limiter.limit(lambda: current_app.config["ENDPOINT_RATE_LIMIT"]) +@csrf.exempt def endpoint() -> ResponseReturnValue: """Receive and queue a Webmention for verification. |
