Initial wiring for getPlaylists endpoint
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package engine
|
||||
|
||||
import (
|
||||
"github.com/deluan/gosonic/domain"
|
||||
)
|
||||
|
||||
type Playlists interface {
|
||||
GetAll() (*domain.Playlists, error)
|
||||
}
|
||||
|
||||
type playlists struct {
|
||||
plsRepo domain.PlaylistRepository
|
||||
}
|
||||
|
||||
func NewPlaylists(pr domain.PlaylistRepository) Playlists {
|
||||
return playlists{pr}
|
||||
}
|
||||
|
||||
func (p playlists) GetAll() (*domain.Playlists, error) {
|
||||
return p.plsRepo.GetAll(domain.QueryOptions{})
|
||||
}
|
||||
Reference in New Issue
Block a user