add delete playlist

This commit is contained in:
sentriz
2019-11-24 23:09:48 +00:00
parent 48397b7291
commit 1f121e1e63

View File

@@ -223,7 +223,8 @@ func (c *Controller) ServeUpdatePlaylist(r *http.Request) *spec.Response {
} }
func (c *Controller) ServeDeletePlaylist(r *http.Request) *spec.Response { func (c *Controller) ServeDeletePlaylist(r *http.Request) *spec.Response {
// user := r.Context().Value(key.User).(*model.User) c.DB.
sub := spec.NewResponse() Where("id = ?", parsing.GetIntParamOr(r, "id", 0)).
return sub Delete(&model.Playlist{})
return spec.NewResponse()
} }