Revamps all of the IOL's routing, so that the new history page can share with the rest.
This commit is contained in:
@@ -4,8 +4,6 @@
|
||||
[auto-ap.logging :refer [warn-event]]
|
||||
[buddy.auth :refer [throw-unauthorized]]
|
||||
[clojure.edn :as edn]
|
||||
[compojure.core :refer [GET POST context defroutes
|
||||
wrap-routes]]
|
||||
[clojure.tools.logging :as log]))
|
||||
(defn handle-graphql [{:keys [request-method query-params] :as r}]
|
||||
(when (= "none" (:user/role (:identity r)))
|
||||
@@ -39,9 +37,5 @@
|
||||
:headers {"Content-Type" "application/edn"}}))))))
|
||||
|
||||
|
||||
(defroutes routes
|
||||
(wrap-routes
|
||||
(context "/graphql" []
|
||||
(GET "/" x (handle-graphql x))
|
||||
(POST "/" x (handle-graphql x)))
|
||||
wrap-secure))
|
||||
(def routes {"api/" {#"graphql/?" :graphql}})
|
||||
(def match->handler {:graphql (wrap-secure handle-graphql)})
|
||||
|
||||
Reference in New Issue
Block a user