From a6f084d0b8e7e62359c4e188499fcddf4428d034 Mon Sep 17 00:00:00 2001 From: Josha von Gizycki Date: Sun, 25 Mar 2018 18:39:06 +0200 Subject: [PATCH] add repl utility namespace --- src/wanijo/repl.clj | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/wanijo/repl.clj diff --git a/src/wanijo/repl.clj b/src/wanijo/repl.clj new file mode 100644 index 0000000..0f081e3 --- /dev/null +++ b/src/wanijo/repl.clj @@ -0,0 +1,12 @@ +(ns wanijo.repl + (:require [clojurewerkz.neocons.rest.nodes :as nodes] + [clojurewerkz.neocons.rest.labels :as labels] + [buddy.hashers :as hashers] + [wanijo.neo4j :as neo4j])) + +(defn create-user! [ident pw] + (let [node (nodes/create + neo4j/conn + {:ident ident + :pw (hashers/derive pw)})] + (labels/add neo4j/conn node "user")))