(20250123) Listing permitted from disabled accounts, new activity not allowed.
This commit is contained in:
@@ -169,8 +169,10 @@ async def payment_list(
|
||||
# Get the token ids from the token keys:
|
||||
auth_tokens = await current_app.payments_controller.get_tokens_from_keys(
|
||||
mongo_data_conn = current_app.data_mongo,
|
||||
token_keys = inbound_data.tokenKeys
|
||||
token_keys = inbound_data.tokenKeys,
|
||||
must_be_active = False
|
||||
)
|
||||
if not auth_tokens: return constants.API_RESPONSE_NO_AUTH_TOKEN
|
||||
token_ids = [t.authTokenId for t in auth_tokens]
|
||||
|
||||
# Build the additional filter:
|
||||
|
||||
@@ -164,13 +164,10 @@ async def request_payment(
|
||||
# Get the token from the token key:
|
||||
auth_token = await current_app.payments_controller.get_token_from_key(
|
||||
mongo_data_conn = current_app.data_mongo,
|
||||
token_key = inbound_data.tokenKey
|
||||
)
|
||||
if auth_token is None: return ResponseModel(
|
||||
status_code = StatusCodes.FAILED,
|
||||
http_code = HttpCodes.UNAUTHORIZED,
|
||||
message = f"No such token key."
|
||||
token_key = inbound_data.tokenKey,
|
||||
must_be_active = True
|
||||
)
|
||||
if not auth_token: return constants.API_RESPONSE_NO_AUTH_TOKEN
|
||||
|
||||
# Get the user's info:
|
||||
user_info = CoreUserInfoModel(**kwargs["session_info"])
|
||||
|
||||
@@ -167,13 +167,10 @@ async def request_oauth_authorization_url(
|
||||
# Get the auth-token:
|
||||
auth_token = await current_app.trading_controller.get_token_from_key(
|
||||
mongo_data_conn = current_app.data_mongo,
|
||||
token_key = inbound_data.tokenKey
|
||||
)
|
||||
if auth_token is None: return ResponseModel(
|
||||
status_code = StatusCodes.FAILED,
|
||||
http_code = HttpCodes.UNAUTHORIZED,
|
||||
message = f"No such token key."
|
||||
token_key = inbound_data.tokenKey,
|
||||
must_be_active = True
|
||||
)
|
||||
if not auth_token: return constants.API_RESPONSE_NO_AUTH_TOKEN
|
||||
|
||||
# Start by assuming failure:
|
||||
symbol_list = TradingSymbolListBrokerResponse()
|
||||
|
||||
Reference in New Issue
Block a user