This is an automated email from the ASF dual-hosted git repository.

sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-release.git


The following commit(s) were added to refs/heads/main by this push:
     new e3e8b00  Allow dev route functions to be used for URL construction
e3e8b00 is described below

commit e3e8b001e80bff31777a3be94ca0e7f38c7250a6
Author: Sean B. Palmer <[email protected]>
AuthorDate: Wed Mar 26 18:08:38 2025 +0200

    Allow dev route functions to be used for URL construction
---
 atr/routes/dev.py | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/atr/routes/dev.py b/atr/routes/dev.py
index 597507b..32d90af 100644
--- a/atr/routes/dev.py
+++ b/atr/routes/dev.py
@@ -17,9 +17,6 @@
 
 
 import asfquart as asfquart
-import asfquart.auth as auth
-import asfquart.base as base
-import asfquart.session as session
 import quart
 
 import atr.db as db
@@ -30,14 +27,10 @@ if asfquart.APP is ...:
     raise RuntimeError("APP is not set")
 
 
[email protected]_route("/dev/send-email", methods=["GET", "POST"])
[email protected](auth.Requirements.committer)
-async def dev_email_send() -> quart.ResponseReturnValue:
[email protected]_route("/dev/send-email", methods=["GET", "POST"])
+async def send_email(session: routes.CommitterSession) -> 
quart.ResponseReturnValue:
     """Simple endpoint for testing email functionality."""
-    web_session = await session.read()
-    if web_session is None:
-        raise base.ASFQuartException("Not authenticated", errorcode=401)
-    asf_id = web_session.uid
+    asf_id = session.uid
 
     if quart.request.method == "POST":
         form = await routes.get_form(quart.request)


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to