mirror of
https://github.com/metosin/reitit.git
synced 2025-12-17 00:11:11 +00:00
response/redirect
This commit is contained in:
parent
21de7a038a
commit
4a4cd5ae9e
2 changed files with 2 additions and 2 deletions
|
|
@ -107,7 +107,7 @@
|
|||
(loop [[file & files] index-files]
|
||||
(if file
|
||||
(if (resource-response (join-paths path file))
|
||||
{:status 302 :headers {"Location" (join-paths uri file)}}
|
||||
(response/redirect (join-paths uri file))
|
||||
(recur files))))))
|
||||
handler (if path
|
||||
(fn [request]
|
||||
|
|
|
|||
|
|
@ -268,7 +268,7 @@
|
|||
|
||||
#?(:clj
|
||||
(deftest resource-handler-test
|
||||
(let [redirect (fn [uri] {:status 302 :headers {"Location" uri}})
|
||||
(let [redirect (fn [uri] {:status 302, :body "", :headers {"Location" uri}})
|
||||
request (fn [uri] {:uri uri, :request-method :get})]
|
||||
(testing "inside a router"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue