Erweiterung der Produktpflege
This commit is contained in:
@@ -291,6 +291,13 @@ func (vr *ValueRepository) DeleteValueFromPropertyId(valueId int, propertyId int
|
||||
return nil
|
||||
}
|
||||
|
||||
func (vr *ValueRepository) UpdateValue(value *models.Value) error {
|
||||
// Implement the logic to update the label/description of an existing value
|
||||
query := `UPDATE values SET label=$1, description=$2 WHERE id=$3 AND propertyid=$4`
|
||||
_, err := vr.db.Exec(query, value.Label, value.Description, value.ID, value.PropertyID)
|
||||
return err
|
||||
}
|
||||
|
||||
func (vr *ValueRepository) GetValue(id int) (*models.Value, error) {
|
||||
// Implement the logic to retrieve the value from the database for the given id
|
||||
query := `SELECT id, label, description FROM values WHERE id=$1`
|
||||
|
||||
Reference in New Issue
Block a user