 
 (defn get-all-users
   "Retrieve all users"
-  []
+  [conn]
   (map
    first
    (d/q '[:find ?email

(defn- scratch-conn
  "Create a connection to an anonymous, in-memory database."
  []
  (let [uri (str db-uri-base (d/squuid))]
    (d/delete-database uri)
    (d/create-database uri)
    (d/connect uri)))

(def conn (d/connect (str db-uri-base "/lesezeichen")))


(defn init-schema [path]
  (transact-all conn (io/resource path)))


(defn add-user [{:keys [email]}]
  (d/transact
   conn
   [{:db/id (d/tempid :db.part/user)
     :user/email email}]))


(defn- get-user-id [email]
  (let [query '[:find ?e
               :in $ ?email
               :where

    (d/q query db eid attr)))


(defn transact-bookmark [conn {:keys [url title email]}]
  (let [uid (get-user-id email)]
    (d/transact
     conn
