def update_event(event_id): args = args_parser.parse({ 'compensation': Arg(int), 'content': Arg(unicode), 'status': Arg(int, required=True), }) status = args.pop('status', None) if status is not None: event_service.process_event(event_id, status, current_user.id) if args.get('compensation') is not None: event_service.update_event(event_id, user_id=current_user.id, **args)
def process_event(event_id): args = args_parser.parse({ 'status': Arg(int, required=True), 'handler_id': Arg(int, allow_missing=True) }) event_service.process_event(event_id, **args)