Files
satusehat-worker/internal/bpjs/apotek/reference/dpho/service.go
T
2026-04-14 01:21:54 +00:00

27 lines
505 B
Go

package dpho
import (
"context"
"service/pkg/errors"
)
type Service interface {
GetDPHO(ctx context.Context) ([]DPHOData, error)
}
type service struct {
repo Repository
}
func NewService(repo Repository) Service {
return &service{repo: repo}
}
func (s *service) GetDPHO(ctx context.Context) ([]DPHOData, error) {
res, err := s.repo.GetDPHO(ctx)
if err != nil {
return nil, errors.ExternalError().Message("Gagal mengambil referensi DPHO Apotek BPJS").Cause(err).Build()
}
return res, nil
}