Beispiel #1
0
def get_status():
    # validate params
    data, status = validate(request.args.to_dict(), 'status')
    if status is False:
        return jsonify(json.dumps(data)), 400

    message, status = business.get_cube_status(**data)
    return jsonify(message), status
Beispiel #2
0
def start():
    # validate params
    data, status = validate(request.args.to_dict(), 'process')
    if status is False:
        return jsonify(json.dumps(data)), 400

    message, status = business.start_process(data)
    return jsonify(message), status
Beispiel #3
0
def craete_raster_size():
    # validate params
    data, status = validate(request.json, 'raster_size')
    if status is False:
        return jsonify(json.dumps(data)), 400

    message, status = business.create_raster_size(**data)
    return jsonify(message), status
Beispiel #4
0
def create():
    # validate params
    data, status = validate(request.json, 'create')
    if status is False:
        return jsonify(json.dumps(data)), 400

    cubes, status = business.create_cube(data)
    return jsonify(message='Cube created', cubes=cubes), status