This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
"kontor-api-gin/internal/models"
|
||||
"kontor-api-gin/internal/repository"
|
||||
"log/slog"
|
||||
)
|
||||
|
||||
type ComicworkService struct {
|
||||
repository *repository.ComicworkRepository
|
||||
}
|
||||
|
||||
func NewComicworkService(repo *repository.ComicworkRepository) *ComicworkService {
|
||||
service := &ComicworkService{repository: repo}
|
||||
return service
|
||||
}
|
||||
|
||||
func (service *ComicworkService) List(context context.Context) ([]models.ComicWork, error) {
|
||||
slog.Info("ComicworkService#List")
|
||||
return service.repository.FindAll(context)
|
||||
}
|
||||
Reference in New Issue
Block a user