Please sign in to comment.
Refactored get-user and user-attribute
Put the cond inside the where clause of the database fetch. The one thing I don't like about this is that if these functions are passed an invalid object (such as a map without :user or :openid), then we will have a situation where we do (fetch-one :users :where nil), which will incorrectly return a result. Perhaps we should add an :else to these conds which looks for something we know not to be in the database.
- Loading branch information...