aboutsummaryrefslogtreecommitdiffhomepage
path: root/model.lisp
diff options
context:
space:
mode:
authorColin Okay <colin@cicadas.surf>2022-10-28 14:49:12 -0500
committerColin Okay <colin@cicadas.surf>2022-10-28 14:49:12 -0500
commit6d2f5539a5d401856e13c87f34daf4f951cc7c6e (patch)
treeb60eb8aa6acf59ebf39a0e2db59355a6b35e6d1e /model.lisp
parent7017fb6cd063075f9c05a92dad8446b27b484a4e (diff)
Add: sample config; destroy playlist; cli startup
Diffstat (limited to 'model.lisp')
-rw-r--r--model.lisp6
1 files changed, 6 insertions, 0 deletions
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)))