This commit is contained in:
aditya.siregar
2024-08-10 23:52:09 +07:00
parent 2fd676ef3e
commit 414c980c13
12 changed files with 68 additions and 28 deletions
+1 -1
View File
@@ -79,7 +79,7 @@ func (r *SiteRepository) Update(ctx context.Context, site *entity.SiteDB) (*enti
func (r *SiteRepository) GetByID(ctx context.Context, id int64) (*entity.SiteDB, error) {
site := new(entity.SiteDB)
if err := r.db.Debug().Preload("Products").First(site, id).Error; err != nil {
if err := r.db.Preload("Products").First(site, id).Error; err != nil {
logger.ContextLogger(ctx).Error("error when getting site by ID", zap.Error(err))
return nil, err
}