From 6d2f5539a5d401856e13c87f34daf4f951cc7c6e Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Fri, 28 Oct 2022 14:49:12 -0500 Subject: Add: sample config; destroy playlist; cli startup --- model.lisp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'model.lisp') diff --git a/model.lisp b/model.lisp index b8f564c..399d018 100644 --- a/model.lisp +++ b/model.lisp @@ -156,6 +156,12 @@ (with-transaction () (make-instance 'playlist :title title :user user))) +(defun destroy-playlist (pl) + (with-transaction () + (setf (user-playlists (playlist-user pl)) + (delete pl (user-playlists (playlist-user pl)))) + (bknr.datastore:delete-object pl))) + (defun update-playlist-title (playlist title) (with-transaction () (setf (playlist-title playlist) title))) -- cgit v1.2.3