   (prepare add-updated)
   (prepare (fn [{html-commands :html-commands :as tentacle}]
              (if html-commands
-               (assoc tentacle :html-commands (string/join "\n" html-commands))
+               (assoc tentacle :html-commands (str/join "\n" html-commands))
                tentacle)))
   (prepare ->snake-keys)
   (transform ->kebab-keys)

  (insert documents
          (values document)))

(defn update-document!
  [document]
  (log/info "Updating document named:" (:name document))
  (update documents
          (set-fields document)
          (where {:name (:name document)})))

(defn save-document!
  [document]
  (if-not (empty? (get-document-by-name (:name document)))
    (update-document! document)
    (create-document! document)))

            [camel-snake-kebab.extras :refer [transform-keys]]
            [clj-time.coerce :refer [to-sql-time]]
            [clj-time.core :as clj-time]
            [clojure.string :as str :refer [split-lines]]
            [doctopus.configuration :refer [server-config]]
            [korma.core :refer :all]
            [korma.db :refer [defdb postgres]]
