Exemple #1
0
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)
Exemple #2
0
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)
Exemple #3
0
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)
Exemple #4
0
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)