feat: update staff data
This commit is contained in:
@@ -2,6 +2,7 @@ package subscribeplanrepository
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
subscribeplandomain "legalgo-BE-go/internal/domain/subscribe_plan"
|
||||
|
||||
"gorm.io/gorm"
|
||||
@@ -12,7 +13,7 @@ func (s *accessor) GetByID(id string) (*subscribeplandomain.SubscribePlan, error
|
||||
|
||||
if err := s.db.First(&subscribePlan, "id = ? ", id).Error; err != nil {
|
||||
if errors.Is(err, gorm.ErrRecordNotFound) {
|
||||
return subscribePlan, errors.New("subscribe plan not found")
|
||||
return subscribePlan, fmt.Errorf("subscribe plan not found")
|
||||
}
|
||||
return subscribePlan, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user