Add context to all methods in engine layer

This commit is contained in:
Deluan
2020-01-22 08:32:31 -05:00
parent c73f549c83
commit f0ee41a8af
14 changed files with 44 additions and 37 deletions
+2 -2
View File
@@ -9,7 +9,7 @@ import (
)
type Playlists interface {
GetAll() (model.Playlists, error)
GetAll(ctx context.Context) (model.Playlists, error)
Get(ctx context.Context, id string) (*PlaylistInfo, error)
Create(ctx context.Context, playlistId, name string, ids []string) error
Delete(ctx context.Context, playlistId string) error
@@ -103,7 +103,7 @@ func (p *playlists) Update(ctx context.Context, playlistId string, name *string,
return p.ds.Playlist().Put(pls)
}
func (p *playlists) GetAll() (model.Playlists, error) {
func (p *playlists) GetAll(ctx context.Context) (model.Playlists, error) {
return p.ds.Playlist().GetAll(model.QueryOptions{})
}