deletePlaylist

This commit is contained in:
Deluan
2016-03-24 12:17:35 -04:00
parent 52850c6ef0
commit a27803a4d1
4 changed files with 30 additions and 0 deletions
+10
View File
@@ -67,6 +67,16 @@ func (c *PlaylistsController) Create() {
c.SendEmptyResponse()
}
func (c *PlaylistsController) Delete() {
id := c.RequiredParamString("id", "Required parameter id is missing")
err := c.pls.Delete(id)
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