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