(20241212) Reorganizing code to perform core actions in one place.

This commit is contained in:
2024-12-12 18:34:51 +05:30
parent 70c817b3b8
commit fb95e0b38c
50 changed files with 1259 additions and 3166 deletions
+3 -3
View File
@@ -67,11 +67,11 @@ from utils_v2.goog.gmail.gmail_client import SCOPES_GMAIL_MAIL_MANAGEMENT
from shared import constants
# Data Models:
from models.data.api.mail.oauth import (
from models.api.mail.oauth import (
OAuthMailAuthorizationRequestHeaders,
OAuthMailAuthorizationRequestData
)
from models.data.core.auth_token import CoreAuthTokenModel
from models.core.auth_token import CoreAuthTokenModel
# For asynchronous activities:
import asyncio
@@ -175,7 +175,7 @@ async def request_oauth_authorization_url(
# ┗┛┗ ┛┗┗ ┛ ┗┻┗┗ ┻ ┗┛┛┗┗ ┛┗ ┻┗┻
# Make a user identifier from the session info:
token_id = await current_app.mail_oauth_model.get_token_id(
token_id = await current_app.mail_controller.get_token_id(
db_conn = current_app.sql_writer,
mongo_conn = current_app.data_mongo,
auth_token = CoreAuthTokenModel(