async def get_registration_event_payment(request: Request, event_registration_id: int): event_registration_controller = EventRegistrationController( request=request) event_data = event_registration_controller.get_event_registration_by_id( registration_event_id=event_registration_id) return FileResponse(event_data.payment_file)
async def get_event_registration_by_id( request: Request, event_registration_id: int, jwt_token: JwtToken = Depends(verify_token)): event_registration_controller = EventRegistrationController( request=request) return event_registration_controller.get_event_registration_by_id( registration_event_id=event_registration_id)
async def approve_registration_event( request: Request, event_registration_id: int, jwt_token: JwtToken = Depends(verify_token)): event_registration_controller = EventRegistrationController( request=request) await event_registration_controller.approve_payment_to_registration( registration_event_id=event_registration_id) return event_registration_controller.get_event_registration_by_id( registration_event_id=event_registration_id)
async def upload_payment_registration_event( request: Request, event_registration_id: int, file: UploadFile = File(...), jwt_token: JwtToken = Depends(verify_token)): file_path = FileHelper.upload_file(file=file, file_type='payment', object_id=event_registration_id) event_registration_controller = EventRegistrationController( request=request) await event_registration_controller.upload_payment_to_registration( registration_event_id=event_registration_id, registration_file=file_path) return event_registration_controller.get_event_registration_by_id( registration_event_id=event_registration_id)
async def get_event_registration( request: Request, event_registration_filter: EventRegistrationFilter): event_registration_controller = EventRegistrationController( request=request) return event_registration_controller.get_event_registration_by_status( status=event_registration_filter.status)
async def get_event_registration(request: Request): event_registration_controller = EventRegistrationController( request=request) return event_registration_controller.get_summary()