add route for thoughts/blog
This commit is contained in:
@ -8,6 +8,9 @@
|
||||
(import bleach [clean])
|
||||
(import validators [domain :as domain?])
|
||||
|
||||
(defmacro unless [test #* body]
|
||||
`(when (not ~test) (do ~@body)))
|
||||
|
||||
(defn error [code message]
|
||||
(return (dict
|
||||
:code code
|
||||
@ -30,9 +33,14 @@
|
||||
(return (error 405 "method not allowed")))
|
||||
|
||||
(when (file? (+ "./www/site/html" path))
|
||||
(unless (= path "/html/view-thought.html")
|
||||
(return (dict
|
||||
:code 200
|
||||
:body (parse-html-file f"./www/site/html{path}")))))
|
||||
:body (parse-html-file f"./www/site/html{path}"))))
|
||||
|
||||
(return (dict
|
||||
:code 200
|
||||
:body (parse-html-file "./www/site/html/html/view-thought.html" #** (. request (get "route") (get "parameters")))))))
|
||||
|
||||
(when (= path "/style.css")
|
||||
(when (!= method "GET")
|
||||
|
Reference in New Issue
Block a user