mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-04 04:57:37 +03:00
Check permissions in playlists
This commit is contained in:
parent
41010515ee
commit
d1a0ffaaee
4 changed files with 72 additions and 51 deletions
|
@ -65,7 +65,6 @@ var (
|
|||
|
||||
var (
|
||||
plsBest = model.Playlist{
|
||||
ID: "10",
|
||||
Name: "Best",
|
||||
Comment: "No Comments",
|
||||
Owner: "userid",
|
||||
|
@ -73,8 +72,8 @@ var (
|
|||
SongCount: 2,
|
||||
Tracks: model.MediaFiles{{ID: "1001"}, {ID: "1003"}},
|
||||
}
|
||||
plsCool = model.Playlist{ID: "11", Name: "Cool", Tracks: model.MediaFiles{{ID: "1004"}}}
|
||||
testPlaylists = model.Playlists{plsBest, plsCool}
|
||||
plsCool = model.Playlist{Name: "Cool", Owner: "userid", Tracks: model.MediaFiles{{ID: "1004"}}}
|
||||
testPlaylists = []*model.Playlist{&plsBest, &plsCool}
|
||||
)
|
||||
|
||||
func P(path string) string {
|
||||
|
@ -117,8 +116,7 @@ var _ = Describe("Initialize test DB", func() {
|
|||
|
||||
pr := NewPlaylistRepository(ctx, o)
|
||||
for i := range testPlaylists {
|
||||
pls := testPlaylists[i]
|
||||
err := pr.Put(&pls)
|
||||
err := pr.Put(testPlaylists[i])
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue