diff --git a/publisher/src/net/deertopia/publisher/server.clj b/publisher/src/net/deertopia/publisher/server.clj index 3d05539..e9e9a37 100644 --- a/publisher/src/net/deertopia/publisher/server.clj +++ b/publisher/src/net/deertopia/publisher/server.clj @@ -38,18 +38,18 @@ (response/content-type "text/html"))) (defn node-by-slug [{{{:keys [slug]} :path} :parameters}] - (-> (hiccup/html {} - [:html - [:head - [:title "node by sluggg"] - doerg-html/charset - doerg-html/viewport] - [:body - [:h1 "node by slug"] - [:pre - (-> slug slug/from-string roam/get-node - roam/org-file doerg-render/to-html)]]]) - #_(-> slug slug/from-string roam/get-node + (-> #_(hiccup/html {} + [:html + [:head + [:title "node by sluggg"] + doerg-html/charset + doerg-html/viewport] + [:body + [:h1 "node by slug"] + [:pre + (-> slug slug/from-string roam/get-node + roam/org-file doerg-render/to-html)]]]) + (-> slug slug/from-string roam/get-node roam/org-file doerg-render/to-html) str response/response diff --git a/publisher/src/net/deertopia/publisher/slug.clj b/publisher/src/net/deertopia/publisher/slug.clj index f530428..0d183cb 100644 --- a/publisher/src/net/deertopia/publisher/slug.clj +++ b/publisher/src/net/deertopia/publisher/slug.clj @@ -13,11 +13,9 @@ (try (let [decoder (Base64/getUrlDecoder)] (when (= 16 (count (.decode decoder s))) (Slug. s))) - (catch IllegalArgumentException e - (when (not= (ex-message e) - (str "Input byte[] should at least " - "have 2 bytes for base64 bytes")) - (throw e))))) + ;; really stupid + (catch IllegalArgumentException _ + nil))) (defn to-string [s] (str s))