A lot of route common params clean up

This commit is contained in:
Scott Idem
2022-01-05 15:30:05 -05:00
parent 280237b46c
commit 0cad38ecad
2 changed files with 0 additions and 20 deletions

View File

@@ -26,25 +26,6 @@ async def get_token_header(x_token: str = Header(...)):
# ### END ### API Lib General ### async get_token_header() ###
# ### BEGIN ### API Lib General ### async get_account_header() ###
# Updated 2022-01-05
# async def get_account_header(x_account_id: str = Header(..., min_length=11, max_length=22)) -> dict:
# log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
# log.debug(locals())
# log.info(f'The x-account-id header has a value. x-account-id: {x_account_id}')
# if account_id := redis_lookup_id_random(table_name='account', record_id_random=x_account_id):
# log.setLevel(logging.DEBUG)
# log.info(f'Found the x-account-id with the value: {x_account_id}')
# x_account = { 'id': account_id, 'id_random': x_account_id }
# log.debug(x_account)
# return x_account
# else:
# log.warning(f'The x-account-id Account ID was not found. Account ID: {x_account_id}')
# raise HTTPException(status_code=403, detail='The x-account-id Account ID was not found.') # Forbidden
# ### END ### API Lib General ### async get_account_header() ###
# ### BEGIN ### API Lib General ### class Common_Route_Params ###
# Updated 2022-01-05
class Common_Route_Params:

View File

@@ -307,7 +307,6 @@ app.include_router(
#prefix='/websocket',
tags=['Websockets'],
#dependencies=[Depends(get_token_header)],
#dependencies=[Depends(get_account_header)],
#responses={404: {'description': 'Not found'}},
)