def apply_preset(): if request.method == 'POST': preset_number = request.json preset = presets.apply_preset(preset_number) message = '%s Applied!' % preset['preset_name'] data = {'message': message, 'preset': preset} return jsonify(data)
def apply_preset(): if request.method == 'POST': preset_number = request.json preset = presets.apply_preset(preset_number) utility.write_config('Configuration', 'current_preset', preset['preset_name']) message = '%s Applied!' % preset['preset_name'] data = {'message': message, 'preset': preset} view_logic.restart_check() return jsonify(data)
def apply_preset(): if request.method == 'POST': preset_number = request.json preset = presets.apply_preset(preset_number) message = '%s Applied!' % preset['preset_name'] data = { 'message': message, 'preset': preset } return jsonify(data)