   "Liberator API for entry resources."
   (:require [clojure.string :as s]
             [defun.core :refer (defun-)]
-            [if-let.core :refer (if-let*)]
+            [if-let.core :refer (if-let* when-let*)]
             [taoensso.timbre :as timbre]
             [compojure.core :as compojure :refer (ANY)]
             [liberator.core :refer (defresource by-method)]

            updated-entry (:updated-entry ctx)
            publish-result (entry-res/publish-entry! conn (:uuid updated-entry) updated-entry user)]
    (do
      (timbre/info "Published entry for:" (:uuid updated-entry))
      (auto-share-on-publish conn ctx publish-result)
      (timbre/info "Published entry:" entry-for)

    (do
      (timbre/info "Created entry for:" entry-for "as" (:uuid entry-result))
      (when (= (:status entry-result) "published")
        (undraft-board conn (:user ctx) org board)
        (auto-share-on-publish conn ctx entry-result))
      (notification/send-trigger! (notification/->trigger :add org board {:new entry-result} (:user ctx) nil))
      {:created-entry entry-result})
