(20241213) Mail Module Reworked!

This commit is contained in:
2024-12-13 14:14:15 +05:30
parent a702e5ca20
commit e8ddffbdfe
12 changed files with 297 additions and 175 deletions
+2 -16
View File
@@ -108,7 +108,7 @@ def init(blueprint_setup_state):
# ---------------------------------------------------------------------------------------------------------------------
@test_callback_bp.route("/callback", methods = ["POST", "GET"])
@test_callback_bp.route("/callback", methods = ["GET", "POST", "PUT", "PATCH", "DELETE"])
@set_api_version(api_version = "1.0.0")
@read_input(sanitize_headers = False, sanitize_data = False)
@get_session_info(key = "X-Session-Token", session_coro = "get_session")
@@ -131,21 +131,7 @@ async def callback_test(
**kwargs
):
print("SESSION INFO:", kwargs.get("session_info"))
# Return a random page:
return await render_template(
random.choice([
r"/mail/oauth/oauth_success.html",
r"/mail/oauth/oauth_failure.html"
]),
mail_client = random.choice([
"GMail",
"Outlook",
"WhatsApp",
"Telegram"
])
)
return f"ok ({request.method})"
# *****************************************************************************************************************