Fix R128 and remaining ID fields to accept both JSON types
- Track.R128 and TrackShort.R128: float64 → JSONR128 (accepts both JSON number and object) - All remaining primary ID fields: string → JSONID (accepts both JSON string and number) Fixed in: account, artist, clip, concert, feed, label, landing, metatag, music_history, pin, queue, radio, search, settings, supplement
This commit is contained in:
1 parent
d0173f795d
commit
dbb823ade3
18 files changed
+75
-44
No files matched your search
@@ -122,7 +122,7 @@ func (d *Day) DeList(data []byte, c ClientInterface) ([]Model, error) {
|
||||
// DayBlock represents a block in a day.
|
||||
type DayBlock struct {
|
||||
BaseModel
|
||||
ID string `json:"id"`
|
||||
ID JSONID `json:"id"`
|
||||
Type string `json:"type"`
|
||||
Title string `json:"title"`
|
||||
Description string `json:"description"`
|
||||
@@ -141,7 +141,7 @@ type DayBlockData struct {
|
||||
// GeneratedPlaylist represents a generated playlist.
|
||||
type GeneratedPlaylist struct {
|
||||
BaseModel
|
||||
ID string `json:"id"`
|
||||
ID JSONID `json:"id"`
|
||||
Title string `json:"title"`
|
||||
Description string `json:"description"`
|
||||
CoverURI string `json:"cover_uri"`
|
||||
@@ -261,7 +261,7 @@ type TrackWithAds struct {
|
||||
// Ad represents an ad.
|
||||
type Ad struct {
|
||||
BaseModel
|
||||
ID string `json:"id"`
|
||||
ID JSONID `json:"id"`
|
||||
Type string `json:"type"`
|
||||
Title string `json:"title"`
|
||||
Description string `json:"description"`
|
||||
|
||||
Reference in new issue
Block a user