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