(20241125) Moved from Nexcom to The CA Office.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
DATE:
|
||||
|
||||
Thursday, 21st Nov., 2024
|
||||
Monday, 25th Nov., 2024
|
||||
|
||||
OBJECTIVE:
|
||||
|
||||
@@ -74,7 +74,7 @@ import asyncio
|
||||
|
||||
|
||||
# Related to Quart:
|
||||
test_callback_bp = Blueprint("user_cb", __name__)
|
||||
mail_callback_bp = Blueprint("mail_cb", __name__)
|
||||
|
||||
|
||||
# *****************************************************************************************************************
|
||||
@@ -94,7 +94,7 @@ test_callback_bp = Blueprint("user_cb", __name__)
|
||||
# *****************************************************************************************************************
|
||||
|
||||
|
||||
@test_callback_bp.record_once
|
||||
@mail_callback_bp.record_once
|
||||
def init(blueprint_setup_state):
|
||||
|
||||
# This gets called when the blueprint is registered.
|
||||
@@ -105,7 +105,7 @@ def init(blueprint_setup_state):
|
||||
# ---------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@test_callback_bp.route("/callback", methods = ["POST", "GET"])
|
||||
@mail_callback_bp.route("/callback/gmail", methods = ["POST", "GET"])
|
||||
@set_api_version(api_version = "1.0.0")
|
||||
@read_input(sanitize_headers = False, sanitize_data = False)
|
||||
@log_request_to_mongo(
|
||||
|
||||
+4
-2
@@ -51,7 +51,7 @@ from shared import constants
|
||||
# My utils:
|
||||
from utils_v2.string import json
|
||||
from utils_v2.api import async_quart
|
||||
from utils_v2.datetime import datetime
|
||||
from utils_v2.date_time import date_time
|
||||
from utils_v2.database.async_mongo_v2 import AsyncMongo
|
||||
from utils_v2.cache.async_redis_cache_v2 import AsyncRedisCache
|
||||
from utils_v2.api.async_quart import (
|
||||
@@ -72,6 +72,7 @@ import httpx
|
||||
from icecream import IceCreamDebugger
|
||||
|
||||
# All the blueprints:
|
||||
from api.blueprints.mail.callback import mail_callback_bp
|
||||
from api.blueprints.test.callback import test_callback_bp
|
||||
|
||||
|
||||
@@ -97,6 +98,7 @@ APP_VERSION = constants.APP_VERSION
|
||||
# The Quart app:
|
||||
app = Quart(__name__)
|
||||
app = cors(app)
|
||||
app.register_blueprint(mail_callback_bp, url_prefix = f"/{MODULE_BASE}/mail")
|
||||
app.register_blueprint(test_callback_bp, url_prefix = f"/{MODULE_BASE}/test")
|
||||
|
||||
|
||||
@@ -295,7 +297,7 @@ async def memory_metrics():
|
||||
"unit": {
|
||||
"mem": "MB"
|
||||
},
|
||||
"ts": datetime.get_current_ist_date_time(as_string = True)
|
||||
"ts": date_time.get_current_ist_date_time(as_string = True)
|
||||
}
|
||||
|
||||
# Done here:
|
||||
|
||||
Reference in New Issue
Block a user