(20241219) SMS module fully re-organized.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
DATE:
|
||||
|
||||
Thursday, 5th Dec., 2024
|
||||
Thursday, 19th Dec., 2024
|
||||
|
||||
OBJECTIVE:
|
||||
|
||||
@@ -145,10 +145,9 @@ async def authorize_sms_client(
|
||||
:return: A standard response structure.
|
||||
"""
|
||||
|
||||
# ┏┓
|
||||
# ┃┃┏┓┏┓┏┓┏┓┏┓┏┏┓┏┏
|
||||
# ┣┛┛ ┗ ┣┛┛ ┗┛┗┗ ┛┛
|
||||
# ┛
|
||||
# ┏┓ ┓ ┏┓┓ ┓
|
||||
# ┣┫┓┏╋┣┓ ┃ ┣┓┏┓┏┃┏
|
||||
# ┛┗┗┻┗┛┗ ┗┛┛┗┗ ┗┛┗
|
||||
|
||||
# If the session token is invalid/expired:
|
||||
if kwargs.get("session_info") is None:
|
||||
@@ -167,8 +166,8 @@ async def authorize_sms_client(
|
||||
if inbound_data.smsClient == "nimbusSmsIndia":
|
||||
|
||||
success = await current_app.sms_controller.set_token_direct(
|
||||
db_conn = current_app.sql_writer,
|
||||
mongo_conn = current_app.data_mongo,
|
||||
sql_conn = current_app.sql_writer,
|
||||
mongo_data_conn = current_app.data_mongo,
|
||||
auth_token = CoreAuthTokenModel(
|
||||
serviceType = "sms",
|
||||
client = inbound_data.smsClient,
|
||||
@@ -183,6 +182,7 @@ async def authorize_sms_client(
|
||||
status = "active",
|
||||
syncFreq = 60
|
||||
),
|
||||
token_notes = {},
|
||||
session_token = inbound_headers["X-Session-Token"]
|
||||
)
|
||||
|
||||
@@ -194,8 +194,8 @@ async def authorize_sms_client(
|
||||
elif inbound_data.smsClient == "savvyBulkSmsKenya":
|
||||
|
||||
success = await current_app.sms_controller.set_token_direct(
|
||||
db_conn = current_app.sql_writer,
|
||||
mongo_conn = current_app.data_mongo,
|
||||
sql_conn = current_app.sql_writer,
|
||||
mongo_data_conn = current_app.data_mongo,
|
||||
auth_token = CoreAuthTokenModel(
|
||||
serviceType = "sms",
|
||||
client = inbound_data.smsClient,
|
||||
@@ -209,6 +209,7 @@ async def authorize_sms_client(
|
||||
status = "active",
|
||||
syncFreq = 60
|
||||
),
|
||||
token_notes = {},
|
||||
session_token = inbound_headers["X-Session-Token"]
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user