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 {
// user := r.Context().Value(key.User).(*model.User)
sub := spec.NewResponse()
return sub
c.DB.
Where("id = ?", parsing.GetIntParamOr(r, "id", 0)).
Delete(&model.Playlist{})
return spec.NewResponse()
}