mirror of
https://github.com/status-im/open-bounty.git
synced 2025-02-23 14:48:13 +00:00
fixes #169 remove http endpoints
This commit is contained in:
parent
d2bfb7f4af
commit
153cc5f6be
@ -1,7 +1,6 @@
|
|||||||
(ns macchiato-web3-example.routes
|
(ns macchiato-web3-example.routes
|
||||||
(:require
|
(:require
|
||||||
[bidi.bidi :as bidi]
|
[bidi.bidi :as bidi]
|
||||||
[hiccups.runtime]
|
|
||||||
[macchiato.util.response :as r]
|
[macchiato.util.response :as r]
|
||||||
[cljs.nodejs :as node]
|
[cljs.nodejs :as node]
|
||||||
[cljs-web3.core :as web3]
|
[cljs-web3.core :as web3]
|
||||||
@ -42,31 +41,13 @@
|
|||||||
(r/content-type "application/json")
|
(r/content-type "application/json")
|
||||||
(res)))
|
(res)))
|
||||||
|
|
||||||
(defn home [req res raise]
|
|
||||||
(-> (html
|
|
||||||
[:html
|
|
||||||
[:head [:link {:rel "stylesheet" :href "/css/site.css"}]]
|
|
||||||
[:body
|
|
||||||
[:h2 "Hello World!"]
|
|
||||||
[:p
|
|
||||||
"Your user-agent is: "
|
|
||||||
(str (get-in req [:headers "user-agent"]))]]])
|
|
||||||
(r/ok)
|
|
||||||
(r/content-type "text/html")
|
|
||||||
(res)))
|
|
||||||
|
|
||||||
(defn not-found [req res raise]
|
(defn not-found [req res raise]
|
||||||
(-> (html
|
(-> (r/not-found)
|
||||||
[:html
|
(r/content-type "application/json")
|
||||||
[:body
|
|
||||||
[:h2 (:uri req) " was not found"]]])
|
|
||||||
(r/not-found)
|
|
||||||
(r/content-type "text/html")
|
|
||||||
(res)))
|
(res)))
|
||||||
|
|
||||||
(def routes
|
(def routes
|
||||||
["/" {:get home
|
["/" {"accounts" accounts
|
||||||
"accounts" accounts
|
|
||||||
"balance" balance}])
|
"balance" balance}])
|
||||||
|
|
||||||
(defn router [req res raise]
|
(defn router [req res raise]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user