diff --git a/doc/advanced/shared_routes.md b/doc/advanced/shared_routes.md index c9947478..6d1c658c 100644 --- a/doc/advanced/shared_routes.md +++ b/doc/advanced/shared_routes.md @@ -53,15 +53,16 @@ For the backend, we can use a custom-expander to expand the routes: ```clj (require '[reitit.ring :as ring]) +(require '[reitit.core :as r]) (defn my-expand [registry] (fn [data opts] - (or (if (keyword? data) - (some-> data - registry - (r/expand opts) - (assoc :name data))) - (r/expand data opts)))) + (if (keyword? data) + (some-> data + registry + (r/expand opts) + (assoc :name data)) + (r/expand data opts)))) ;; the handler functions (defn get-kikka [_] {:status 200, :body "get"})