Add missing JSON tags for Show

This commit is contained in:
Grégoire Delattre 2017-01-03 15:52:24 +01:00
parent 34305ade6c
commit 5faa3225af

View File

@ -80,12 +80,12 @@ var (
type Show struct { type Show struct {
sqly.BaseModel sqly.BaseModel
polochon.Show polochon.Show
Episodes []*Episode Episodes []*Episode `json:"episodes"`
TrackedSeason int TrackedSeason int `json:"tracked_season"`
TrackedEpisode int TrackedEpisode int `json:"tracked_episode"`
BannerURL string `json:"banner_url"` BannerURL string `json:"banner_url"`
FanartURL string `json:"fanart_url"` FanartURL string `json:"fanart_url"`
PosterURL string `json:"poster_url"` PosterURL string `json:"poster_url"`
} }
// ShowDB represents the Show in the DB // ShowDB represents the Show in the DB
@ -100,7 +100,6 @@ type ShowDB struct {
FirstAired time.Time `db:"first_aired"` FirstAired time.Time `db:"first_aired"`
Created time.Time `db:"created_at"` Created time.Time `db:"created_at"`
Updated time.Time `db:"updated_at"` Updated time.Time `db:"updated_at"`
// URL string `json:"-"`
} }
// NewShowDB returns a Show ready to be put in DB from a // NewShowDB returns a Show ready to be put in DB from a