summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Tom Willemse2026-09-08 23:21:08 -0700
committerGravatar Tom Willemse2026-09-08 23:43:35 -0700
commit3e1a51d4832939d7ba4d753142a45cdbbcacb817 (patch)
tree31d32cea948879a12b604f5305e8635d27cf1d7f /src
parentd82e2edcde3fec1f1a19b69645428a35cf3c4e11 (diff)
downloadlezer-3e1a51d4832939d7ba4d753142a45cdbbcacb817.tar.gz
lezer-3e1a51d4832939d7ba4d753142a45cdbbcacb817.zip
Remove unused definitions
Diffstat (limited to 'src')
-rw-r--r--src/app.phel3
-rw-r--r--src/controller/routes.phel3
-rw-r--r--src/view/main.phel16
3 files changed, 1 insertions, 21 deletions
diff --git a/src/app.phel b/src/app.phel
index 41565bf..0397b99 100644
--- a/src/app.phel
+++ b/src/app.phel
@@ -10,9 +10,6 @@
(r/router
[["/" {:handler (fn [req]
(routes/index-handler req router))}]
- ["/ping" {:name ::ping
- :get {:handler routes/ping-handler}
- :post {:handler routes/ping-handler}}]
["/book" {:post {:handler routes/book-create-handler}}]
["/book/{id}/session" {:post {:handler routes/book-session-create-handler}}]
["/author/{id}" {:name :author
diff --git a/src/controller/routes.phel b/src/controller/routes.phel
index acfc2af..38d1882 100644
--- a/src/controller/routes.phel
+++ b/src/controller/routes.phel
@@ -15,9 +15,6 @@
(h/response-from-map {:status 200
:body (index-html books router)})))
-(defn ping-handler [req]
- (h/response-from-map {:status 200
- :body (g/greet (str "pong - " (rand)))}))
(defn book-create-handler [request]
(let [title (get-in request [:parsed-body "title"])
diff --git a/src/view/main.phel b/src/view/main.phel
index dc57f3c..e25a079 100644
--- a/src/view/main.phel
+++ b/src/view/main.phel
@@ -11,17 +11,6 @@
[:link {:rel "icon" :type "image/png" :href "./images/favicon-32.png"}]
[:title "Lezer"]])
-(def- logo
- [:div {:class "logo"}
- [:img {:src "./images/logo.svg" :width "360"}]])
-
-(def- links
- [:div {:class "links"}
- [:a {:href "https://phel-lang.org/"} "Homepage"]
- [:a {:href "https://phel-lang.org/documentation/getting-started/"} "Getting started"]
- [:a {:href "https://github.com/phel-lang/phel-lang"} "GitHub"]
- [:a {:href "https://gitter.im/phel-lang/community"} "Community"]])
-
(defn- authors-list [authors router]
(raw-string (html [:span
(let [a (first authors)]
@@ -31,7 +20,7 @@
[:span ", "
[:a {:href (r/generate router :author {:id (:id a)})} (:name a)]])])))
-(defn content [books router]
+(defn index-html [books router]
(html
(doctype :html5)
[:html
@@ -65,6 +54,3 @@
[:label {:for "pages"} "# of pages: "]
[:input {:type "number" :name "pages"}]
[:input {:type "submit"}]]]]]]))
-
-(defn index-html [books router]
- (content books router))