(20241129) User infor needs to be fetched from Mongo.
This commit is contained in:
@@ -134,14 +134,14 @@ class MailOAuthModel(BaseModel):
|
||||
},
|
||||
update = {
|
||||
"$set": {
|
||||
"lastRequestTs": request_ts
|
||||
"lastRequestTs": request_ts,
|
||||
"user": user_info,
|
||||
},
|
||||
"$setOnInsert": {
|
||||
"version": "1.0.0",
|
||||
"serviceType": service_type,
|
||||
"client": service_client,
|
||||
"authType": auth_type,
|
||||
"user": user_info,
|
||||
"token": None,
|
||||
"firstRefreshTs": None,
|
||||
"lastRefreshTs": None,
|
||||
@@ -182,7 +182,6 @@ class MailOAuthModel(BaseModel):
|
||||
self,
|
||||
db_conn: AsyncMySQL,
|
||||
mongo_conn: AsyncMongo,
|
||||
user_info: dict,
|
||||
user_identifier: ObjectId | str,
|
||||
token: dict,
|
||||
session_token: str = None
|
||||
@@ -227,15 +226,15 @@ class MailOAuthModel(BaseModel):
|
||||
db_conn = db_conn,
|
||||
proc_name = "entity_integration_save",
|
||||
proc_args = (
|
||||
user_info["entityId"], # ... 'p_entity_id'
|
||||
mongo_json["client"], # .... 'p_provider'
|
||||
"Auth Granted", # .......... 'p_current_status'
|
||||
"Set Token", # ............. 'p_last_action'
|
||||
None, # .................... 'p_display_name'
|
||||
None, # .................... 'p_display_picture'
|
||||
user_identifier, # ......... 'p_token_id'
|
||||
token["email"], # .......... 'p_notes'
|
||||
user_info["userId"] # ...... 'p_created_by'
|
||||
mongo_json["user"]["entityId"], # ... 'p_entity_id'
|
||||
mongo_json["client"], # ............. 'p_provider'
|
||||
"Auth Granted", # ................... 'p_current_status'
|
||||
"Set Token", # ...................... 'p_last_action'
|
||||
None, # ............................. 'p_display_name'
|
||||
None, # ............................. 'p_display_picture'
|
||||
user_identifier, # .................. 'p_token_id'
|
||||
token["email"], # ................... 'p_notes'
|
||||
mongo_json["user"]["userId"] # ...... 'p_created_by'
|
||||
),
|
||||
session_token = session_token
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user