mirror of
https://github.com/navidrome/navidrome.git
synced 2026-11-14 14:18:42 +01:00
createPlaylist
This commit is contained in:
parent
5b2ecc39ca
commit
52850c6ef0
4 changed files with 48 additions and 2 deletions
|
|
@ -56,6 +56,17 @@ func (c *PlaylistsController) Get() {
|
|||
c.SendResponse(response)
|
||||
}
|
||||
|
||||
func (c *PlaylistsController) Create() {
|
||||
songIds := c.RequiredParamStrings("songId", "Required parameter songId is missing")
|
||||
name := c.RequiredParamString("name", "Required parameter name is missing")
|
||||
err := c.pls.Create(name, songIds)
|
||||
if err != nil {
|
||||
beego.Error(err)
|
||||
c.SendError(responses.ErrorGeneric, "Internal Error")
|
||||
}
|
||||
c.SendEmptyResponse()
|
||||
}
|
||||
|
||||
func (c *PlaylistsController) buildPlaylist(d *engine.PlaylistInfo) *responses.PlaylistWithSongs {
|
||||
pls := &responses.PlaylistWithSongs{}
|
||||
pls.Id = d.Id
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue