fix(repository): Change Save to Updates in Update method for better handling of menu updates

This commit is contained in:
Habib Fatkhul Rohman 2025-10-28 20:48:19 +07:00
parent 8fe0448aa8
commit 2020a906fc
1 changed files with 1 additions and 1 deletions

View File

@ -86,7 +86,7 @@ func (m *menuRepository) Update(ctx context.Context, tx *gorm.DB, menu entities.
tx = m.db tx = m.db
} }
if err := tx.WithContext(ctx).Save(&menu).Error; err != nil { if err := tx.WithContext(ctx).Updates(&menu).Error; err != nil {
return entities.M_Menu{}, err return entities.M_Menu{}, err
} }