Working on individual module routes

This commit is contained in:
Scott Idem
2021-03-10 15:30:53 -05:00
parent 19222ee946
commit 260091c2ae
4 changed files with 83 additions and 15 deletions

View File

@@ -123,4 +123,24 @@ async def delete_account_obj(
obj_type=obj_type,
obj_id=obj_id,
)
return result
return result
@router.get('/{obj_id}/cfg', response_model=Resp_Body_Base)
async def get_account_cfg_obj(
obj_id: str = Query(..., min_length=1, max_length=22),
x_account_id: str = Header(...),
by_alias: Optional[bool] = True,
exclude_unset: Optional[bool] = True,
):
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
log.debug(locals())
obj_type = 'account_cfg'
result = get_obj_template(
obj_type=obj_type,
obj_id=obj_id,
by_alias=True,
exclude_unset=True,
)
return result