Fix rules serialization
This commit is contained in:
@@ -20,7 +20,7 @@ type playlistRepository struct {
|
|||||||
|
|
||||||
type dbPlaylist struct {
|
type dbPlaylist struct {
|
||||||
model.Playlist `structs:",flatten"`
|
model.Playlist `structs:",flatten"`
|
||||||
RawRules string `structs:"rules"`
|
RawRules string `structs:"rules" orm:"column(rules)"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewPlaylistRepository(ctx context.Context, o orm.Ormer) model.PlaylistRepository {
|
func NewPlaylistRepository(ctx context.Context, o orm.Ormer) model.PlaylistRepository {
|
||||||
|
|||||||
@@ -14,12 +14,12 @@ type playlistTrackRepository struct {
|
|||||||
sqlRepository
|
sqlRepository
|
||||||
sqlRestful
|
sqlRestful
|
||||||
playlistId string
|
playlistId string
|
||||||
playlistRepo model.PlaylistRepository
|
playlistRepo *playlistRepository
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *playlistRepository) Tracks(playlistId string) model.PlaylistTrackRepository {
|
func (r *playlistRepository) Tracks(playlistId string) model.PlaylistTrackRepository {
|
||||||
p := &playlistTrackRepository{}
|
p := &playlistTrackRepository{}
|
||||||
p.playlistRepo = NewPlaylistRepository(r.ctx, r.ormer)
|
p.playlistRepo = r
|
||||||
p.playlistId = playlistId
|
p.playlistId = playlistId
|
||||||
p.ctx = r.ctx
|
p.ctx = r.ctx
|
||||||
p.ormer = r.ormer
|
p.ormer = r.ormer
|
||||||
|
|||||||
Reference in New Issue
Block a user