Ejemplo n.º 1
0
def modify_product():
    info = request.get_json()
    product = info.get('product')  # The product whose value we wish to change
    attribute = info.get(
        'attribute')  # The column name whose value we wish to change
    value = info.get('value')  # The new value we wish to add

    db = DatabaseConnection()
    message = db.modify_product(product, attribute, value)

    return jsonify({'message': message}), 201