Permalink
Browse files

Uncommented user destroy function

  • Loading branch information...
1 parent 19769d9 commit d58c5c2601df9f657870b40b5d9ebe432076d6f5 David Davis committed Aug 11, 2012
Showing with 6 additions and 6 deletions.
  1. +6 −6 src/shared_resource/models/user.clj
@@ -16,16 +16,16 @@
(let [conn (d/connect (uri datomic-config))]
(q '[:find ?n :where [?c user/username ?n ]] (db conn))))
-;(defn destroy-user [username]
- ;(let [conn (d/connect (uri datomic-config))]
- ;(d/transact
- ;conn
- ;[[:db.fn/retractEntity (find-user username)]])))
-
(defn find-user [username]
(let [conn (d/connect (uri datomic-config))]
(first (first (q `[:find ?c :where [?c user/username ~username]] (db conn))))))
+(defn destroy-user [username]
+ (let [conn (d/connect (uri datomic-config))]
+ (d/transact
+ conn
+ [[:db.fn/retractEntity (find-user username)]])))
+
(defn find-or-create-user [{:keys [username full-name email]}]
(if-let [user-record (find-user username)]
user-record

0 comments on commit d58c5c2

Please sign in to comment.