23 lines
491 B
Go
23 lines
491 B
Go
package service
|
|
|
|
import (
|
|
"context"
|
|
"kontor-api-gin/internal/models"
|
|
"kontor-api-gin/internal/repository"
|
|
"log/slog"
|
|
)
|
|
|
|
type IssueService struct {
|
|
repository *repository.IssueRepository
|
|
}
|
|
|
|
func NewIssueService(repo *repository.IssueRepository) *IssueService {
|
|
service := &IssueService{repository: repo}
|
|
return service
|
|
}
|
|
|
|
func (service *IssueService) List(context context.Context) ([]models.Issue, error) {
|
|
slog.Info("IssueService#List")
|
|
return service.repository.FindAll(context)
|
|
}
|