Skip to content

Commit

Permalink
Circle #280
Browse files Browse the repository at this point in the history
  • Loading branch information
yogthos committed Jan 31, 2024
1 parent 46824d9 commit 840787b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/docs/integrant.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,12 @@ <h2>Contents</h2>
:as opts}&#93;
&#40;layout/init-selmer!&#41;
&#91;base-path &#40;route-data opts&#41; &#40;page-routes opts&#41;&#93;&#41;
</code></pre><p>The multimethod should pass the opts to the function that defines the routes, and from there to the request handler function that will access the <code>:query-fn</code> key from the opts map as follows:</p><pre><code class="clojure">
&#40;defn home &#91;{:keys &#91;query-fn&#93;} {:keys &#91;flash&#93; :as request}&#93;
</code></pre><p>The multimethod should pass the opts to the function that defines the routes, and from there to the request handler function that will access the <code>:query-fn</code> key from the opts map as follows:</p><pre><code class="clojure">&#40;defn home &#91;{:keys &#91;query-fn&#93;} {:keys &#91;flash&#93; :as request}&#93;
&#40;layout/render request &quot;home.html&quot; {:messages &#40;query-fn :get-messages {}&#41;
:errors &#40;:errors flash&#41;}&#41;&#41;

&#40;defn page-routes &#91;opts&#93;
&#91;&#91;&quot;/&quot; {:get &#40;partial home opts&#41;}&#93;&#93;&#41;
</code></pre>
</div>
</div>
Expand Down

0 comments on commit 840787b

Please sign in to comment.