General clean up. Work on abstracts and websockets

This commit is contained in:
Scott Idem
2023-03-23 19:12:13 -04:00
parent 430a155b75
commit 224aaed969
8 changed files with 435 additions and 48 deletions

View File

@@ -39,8 +39,10 @@ def mk_resp(
status_name: str = '',
success: bool = True,
details: str = '',
include: dict = None,
exclude: dict = None,
by_alias: bool = True,
exclude_unset: bool = True,
exclude_unset: bool = False,
response: Response = None
) -> dict:
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
@@ -63,7 +65,7 @@ def mk_resp(
data_out = { 'result': data }
else: # Assuming it is still and object. This should be improved. Example model type: "<class 'app.models.account_models.Account_Base'>"
log.info('Data type is other')
data_out = data.dict(by_alias=by_alias, exclude_unset=exclude_unset)
data_out = data.dict(include=include, exclude=exclude, by_alias=by_alias, exclude_unset=exclude_unset)
# log.debug(data_out)
resp_body = {}