updates
This commit is contained in:
19
server/internal/service/nutrient_service.go
Normal file
19
server/internal/service/nutrient_service.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
"go-server/internal/models"
|
||||
"go-server/internal/repository"
|
||||
)
|
||||
|
||||
type NutrientService struct {
|
||||
repo *repository.NutrientRepository
|
||||
}
|
||||
|
||||
func NewNutrientService(repo *repository.NutrientRepository) *NutrientService {
|
||||
return &NutrientService{repo: repo}
|
||||
}
|
||||
|
||||
func (s *NutrientService) GetAll(ctx context.Context) ([]*models.Nutrient, error) {
|
||||
return s.repo.GetAll(ctx)
|
||||
}
|
||||
Reference in New Issue
Block a user