indentaion, query-rawdata!

integration-tests
Josha von Gizycki 7 years ago
parent a2bd971596
commit 89166ad351

@ -1,8 +1,9 @@
(ns wanijo.handler
(:require [compojure.core :refer [defroutes
routes]]
(:require [compojure.core
:refer [defroutes routes]]
[compojure.route :as route]
[ring.middleware.defaults :refer [wrap-defaults site-defaults]]
[ring.middleware.defaults
:refer [wrap-defaults site-defaults]]
[ring.util.response :as rur]
[ring.middleware.session.cookie :as session-cookie]
[wanijo.auth.routes :refer [auth-routes]]

@ -21,18 +21,19 @@
(defn query-rawdata!
[& {:keys [query alias params]
:or {params {}}}]
(devmode/send-to-bar (str (butiful-query query) "<br>---Params---<br>" params))
(devmode/send-to-bar (str (butiful-query query)
"<br>---Params---<br>"
params))
(->>
(cypher/tquery (conn!) query params)
(map #(get % alias))
(map :data)))
(defn find-user! [ident]
(some->
(cypher/tquery
(conn!)
"MATCH (n:user) WHERE n.ident = {ident} RETURN n"
{:ident ident})
first
(get "n")
:data))
(query-rawdata!
:query
"MATCH (n:user)
WHERE n.ident = {ident}
RETURN n"
:alias "n"
:params {:ident ident}))

Loading…
Cancel
Save