From 578e2fa0790a7c749e0f597bcdc6b5e4f776dfa2 Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Fri, 28 Oct 2022 07:15:52 -0500 Subject: Add: collaborator/editor managment on playlists --- model.lisp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'model.lisp') diff --git a/model.lisp b/model.lisp index a866088..b8f564c 100644 --- a/model.lisp +++ b/model.lisp @@ -110,6 +110,15 @@ (hash-string pw (user-pwsalt user))) user)))) +(defun remove-editor (playlist editor) + (with-transaction () + (setf (playlist-editors playlist) + (delete editor (playlist-editors playlist))))) + +(defun add-editor (playlist editor) + (with-transaction () + (pushnew editor (playlist-editors playlist) :test #'eq))) + (defun destroy-invite (invite) (with-transaction () (bknr.datastore:delete-object invite))) -- cgit v1.2.3