A lot of work on event related modules
This commit is contained in:
@@ -158,4 +158,63 @@ async def post_event_person_new(
|
||||
return mk_resp(data=False)
|
||||
|
||||
log.debug(event_person_obj)
|
||||
return mk_resp(data=event_person_obj)
|
||||
return mk_resp(data=event_person_obj)
|
||||
|
||||
|
||||
# ### BEGIN ### API Event Person ### get_event_person_obj() ###
|
||||
# Working well as of 2021-06-04. Using as a template for other routes.
|
||||
@router.get('/{event_person_id}', response_model=Resp_Body_Base)
|
||||
async def get_event_person_obj(
|
||||
event_person_id: str = Query(..., min_length=1, max_length=22),
|
||||
enabled: str = 'enabled', # For now this covers any included objects or object lists
|
||||
limit: int = 500, # For now this covers any included objects or object lists
|
||||
inc_event_abstract_list: bool = False,
|
||||
inc_event_badge: bool = False,
|
||||
#inc_event_device_list: bool = False,
|
||||
#inc_event_exhibit_list: bool = False,
|
||||
inc_event_file_list: bool = False,
|
||||
#inc_event_location_list: bool = False,
|
||||
#inc_event_person_list: bool = False,
|
||||
inc_event_presentation_list: bool = False,
|
||||
#inc_event_presenter_list: bool = False,
|
||||
inc_event_registration: bool = False,
|
||||
#inc_event_track: bool = False,
|
||||
inc_person: bool = False,
|
||||
inc_user: bool = False,
|
||||
x_account_id: str = Header(...),
|
||||
by_alias: Optional[bool] = True,
|
||||
exclude_unset: Optional[bool] = True,
|
||||
):
|
||||
log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
if event_person_id := redis_lookup_id_random(record_id_random=event_person_id, table_name='event_person'): pass
|
||||
else:
|
||||
return mk_resp(data=None, status_code=404)
|
||||
|
||||
if event_person_obj := load_event_person_obj(
|
||||
event_person_id=event_person_id,
|
||||
enabled=enabled,
|
||||
limit=limit,
|
||||
inc_event_abstract_list=inc_event_abstract_list,
|
||||
inc_event_badge=inc_event_badge,
|
||||
#inc_event_device_list=inc_event_device_list,
|
||||
#inc_event_exhibit_list=inc_event_exhibit_list,
|
||||
inc_event_file_list=inc_event_file_list,
|
||||
#inc_event_location=inc_event_location,
|
||||
#inc_event_person_list=inc_event_person_list,
|
||||
inc_event_presentation_list=inc_event_presentation_list,
|
||||
#inc_event_presenter_list=inc_event_presenter_list,
|
||||
inc_event_registration=inc_event_registration,
|
||||
#inc_event_track=inc_event_track,
|
||||
inc_poc_event_person=inc_poc_event_person,
|
||||
inc_person=inc_person,
|
||||
inc_user=inc_user,
|
||||
):
|
||||
# event_dict = event_person_obj.dict(by_alias=by_alias, exclude_unset=exclude_unset)
|
||||
pass
|
||||
else:
|
||||
return mk_resp(data=False, status_code=400) # Bad Request
|
||||
|
||||
return mk_resp(data=event_person_obj)
|
||||
# ### END ### API Event ### get_event_person_obj() ###
|
||||
|
||||
Reference in New Issue
Block a user