This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user