A lot of work on event related modules
This commit is contained in:
@@ -228,6 +228,62 @@ async def get_event_session_obj(
|
||||
return result
|
||||
|
||||
|
||||
# ### BEGIN ### API Event Session ### get_event_session_obj() ###
|
||||
# Working well as of 2021-06-04. Using as a template for other routes.
|
||||
@router.get('/{event_session_id}', response_model=Resp_Body_Base)
|
||||
async def get_event_session_obj(
|
||||
event_session_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_list: bool = False,
|
||||
inc_event_device_list: bool = False,
|
||||
inc_event_file_list: bool = False,
|
||||
inc_event_location: bool = False,
|
||||
inc_event_person_list: bool = False,
|
||||
inc_event_presentation_list: bool = False,
|
||||
inc_event_presenter_cat: bool = False,
|
||||
inc_event_presenter_list: bool = False,
|
||||
inc_event_registration_list: bool = False,
|
||||
inc_event_track: bool = False,
|
||||
inc_poc_event_person: 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_session_id := redis_lookup_id_random(record_id_random=event_session_id, table_name='event_session'): pass
|
||||
else:
|
||||
return mk_resp(data=None, status_code=404)
|
||||
|
||||
if event_session_obj := load_event_session_obj(
|
||||
event_session_id=event_session_id,
|
||||
enabled=enabled,
|
||||
limit=limit,
|
||||
inc_event_abstract_list=inc_event_abstract_list,
|
||||
inc_event_badge_list=inc_event_badge_list,
|
||||
inc_event_device_list=inc_event_device_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_cat=inc_event_presenter_cat,
|
||||
inc_event_presenter_list=inc_event_presenter_list,
|
||||
inc_event_registration_list=inc_event_registration_list,
|
||||
inc_event_track=inc_event_track,
|
||||
inc_poc_event_person=inc_poc_event_person,
|
||||
):
|
||||
# event_dict = event_session_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_session_obj)
|
||||
# ### END ### API Event ### get_event_session_obj() ###
|
||||
|
||||
|
||||
@router.delete('/{obj_id}', response_model=Resp_Body_Base)
|
||||
async def delete_event_session_obj(
|
||||
obj_id: str = Query(..., min_length=1, max_length=22),
|
||||
|
||||
Reference in New Issue
Block a user