Make fields songCount, duration, created and changed mandatory in playlists responses (fixes #164)

This commit is contained in:
Deluan
2020-04-11 19:15:15 -04:00
parent 9fb4f5ef52
commit e476a5f6f1
5 changed files with 17 additions and 17 deletions
+4 -4
View File
@@ -36,8 +36,8 @@ func (c *PlaylistsController) GetPlaylists(w http.ResponseWriter, r *http.Reques
playlists[i].Duration = int(p.Duration)
playlists[i].Owner = p.Owner
playlists[i].Public = p.Public
playlists[i].Created = &p.CreatedAt
playlists[i].Changed = &p.UpdatedAt
playlists[i].Created = p.CreatedAt
playlists[i].Changed = p.UpdatedAt
}
response := NewResponse()
response.Playlists = &responses.Playlists{Playlist: playlists}
@@ -144,7 +144,7 @@ func (c *PlaylistsController) buildPlaylist(d *engine.PlaylistInfo) *responses.P
pls.Owner = d.Owner
pls.Duration = d.Duration
pls.Public = d.Public
pls.Created = &d.Created
pls.Changed = &d.Changed
pls.Created = d.Created
pls.Changed = d.Changed
return pls
}