commit 3e1502d61ae7869727961a63279142386e122877
parent ca276a7ead56ecbd8b73cd2e9341aec62f8a8f74
Author: Decay <decay@todayiwilllaunchmyinfantsonintoorbit.com>
Date: Sat, 12 Sep 2020 14:46:14 -0700
More mysterious changes
Diffstat:
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/db.lisp b/src/db.lisp
@@ -92,7 +92,7 @@
(limit max-entries))))))
(defun update-entry (id title content &key (username "nobody"))
- "Update entry by id. Throws if the id isn't found"
+ "Update entry by id. Returns the updated entry or nil if the id doesn't exist."
(let ((entry (get-raw-entry id)))
(if entry
(xform (progn
@@ -100,8 +100,7 @@
(setf (entry-content entry) content)
(setf (entry-last-updated-by entry) username)
(save-dao entry)
- entry))
- (error "Post ID ~d not found!" id))))
+ entry)))))
(defun delete-entry (id)
"Delete the specified entry from the database. No-op if the id is invalid."