Skip to content

Instantly share code, notes, and snippets.

@donbonifacio
Last active August 29, 2015 14:19
Show Gist options
  • Save donbonifacio/b48f992b461d6bb321eb to your computer and use it in GitHub Desktop.
Save donbonifacio/b48f992b461d6bb321eb to your computer and use it in GitHub Desktop.
Mongo gateway implementation
(defn save!
"Persists an account"
[account]
(-> (common/db)
(mc/save-and-return "accounts" account)))
(defn find-by-id
"Find account by given query"
[id]
(-> (common/db)
(mc/find-map-by-id "accounts" id)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment