Browse Source

implement delete-archive-entry in nera package.

stable
Craig Oates 2 years ago
parent
commit
ee336d3c83
  1. 11
      src/nera.lisp

11
src/nera.lisp

@ -39,7 +39,8 @@
#:delete-storage-file
#:get-all-archive-entries
#:create-archive-entry
#:get-archive-entry))
#:get-archive-entry
#:delete-archive-entry))
(in-package #:nera-db)
(defparameter *tables* '(user site-settings page storage-file archive-entry)
@ -304,3 +305,11 @@ slug is updated based on `NEW-FILE-NAME'."
((and (not id) (not title))
(mito:find-dao 'archive:archive-entry :slug slug))
(t nil))))
(defun delete-archive-entry (&key id slug)
"Delete `ARCHIVE-ENTRY' from the database."
(with-connection (db)
(cond ((not slug)
(mito:delete-dao (mito:find-dao 'archive:archive-entry :id id)))
((not id)
(mito:delete-dao (mito:find-dao 'archive:archive-entry :slug slug))))))

Loading…
Cancel
Save