mirror of
https://github.com/metosin/reitit.git
synced 2025-12-17 16:31:11 +00:00
Get rid of conf.js (not used anymore)
This commit is contained in:
parent
e27d5c0213
commit
bf3242a6f4
1 changed files with 1 additions and 5 deletions
|
|
@ -32,14 +32,10 @@
|
||||||
(create-swagger-ui-handler nil))
|
(create-swagger-ui-handler nil))
|
||||||
([options]
|
([options]
|
||||||
(let [config-json (fn [{:keys [url config]}] (j/write-value-as-string (merge config {:url url})))
|
(let [config-json (fn [{:keys [url config]}] (j/write-value-as-string (merge config {:url url})))
|
||||||
conf-js (fn [opts] (str "window.API_CONF = " (config-json opts) ";"))
|
|
||||||
options (as-> options $
|
options (as-> options $
|
||||||
(update $ :root (fnil identity "swagger-ui"))
|
(update $ :root (fnil identity "swagger-ui"))
|
||||||
(update $ :url (fnil identity "/swagger.json"))
|
(update $ :url (fnil identity "/swagger.json"))
|
||||||
(assoc $ :paths {"/conf.js" {:headers {"Content-Type" "application/javascript"}
|
(assoc $ :paths {"/config.json" {:headers {"Content-Type" "application/json"}
|
||||||
:status 200
|
|
||||||
:body (conf-js $)}
|
|
||||||
"/config.json" {:headers {"Content-Type" "application/json"}
|
|
||||||
:status 200
|
:status 200
|
||||||
:body (config-json $)}}))]
|
:body (config-json $)}}))]
|
||||||
(ring/routes
|
(ring/routes
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue