def volume(): if request.method == 'GET': s = DataRepository.get_volume() return jsonify(s), 200 elif request.method == 'PUT': gegevens = DataRepository.json_or_formdata(request) data = DataRepository.change_volume(gegevens['volume']) change_volume(int(gegevens['volume'])) return jsonify(id=data), 200
def save_volume(volume): #print("volume: ", volume) DataRepository.change_volume(volume)