Example #1
0
def add():
    update_dict = format_request_params(get_request_params(),
                                        model.default_values,
                                        int_keys_processor(model.int_keys),
                                        full_fields=True)
    model.create_obj(update_dict)
    return Resp.ok()
Example #2
0
def add():
    data = get_request_params()
    daily_new_data = format_request_params(
        data,
        model.default_values, [int_keys_processor(model.int_keys)],
        convert_object_id=True,
        resource_processor=resource_processor(['icon']),
        full_fields=True)
    model.create_obj(daily_new_data)
    return Resp.ok()