TimeZynk / mongo

A clojure wrapper for the com.mongodb.client Java API.
MIT License
1 stars 0 forks source link

Convenience middleware #23

Closed eureton closed 1 month ago

eureton commented 1 month ago

I find myself defining the same middleware function in all my ring projects:

(require '[com.timezynk.mongo.util :as mu])

(defn- wrap-mongo [handler]
  (fn [request]
    (mu/wrap-mongo (handler request))))

Would be nice to get it straight from here :slightly_smiling_face:.

lars-timezynk commented 1 month ago

I have added a function to version 0.10.0: https://github.com/TimeZynk/mongo/blob/68924cb0d37e02c959ec1aba5f2663a6d32c9da6/src/com/timezynk/mongo/util.clj#L77