feat: update and delete tags and categories
This commit is contained in:
@@ -11,7 +11,7 @@ func (a *accessor) Update(spec categorydomain.Category) error {
|
||||
if err := a.DB.Clauses(clause.OnConflict{
|
||||
Columns: []clause.Column{{Name: "id"}},
|
||||
DoUpdates: clause.AssignmentColumns([]string{"name", "code", "updated_at"}),
|
||||
}).Save(&spec).Error; err != nil {
|
||||
}).Select("name", "code", "updated_at").Save(&spec).Error; err != nil {
|
||||
return fmt.Errorf("failed to update category: %v", err)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user