mirror of
https://github.com/metosin/reitit.git
synced 2025-12-17 00:11: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))
|
||||
([options]
|
||||
(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 $
|
||||
(update $ :root (fnil identity "swagger-ui"))
|
||||
(update $ :url (fnil identity "/swagger.json"))
|
||||
(assoc $ :paths {"/conf.js" {:headers {"Content-Type" "application/javascript"}
|
||||
:status 200
|
||||
:body (conf-js $)}
|
||||
"/config.json" {:headers {"Content-Type" "application/json"}
|
||||
(assoc $ :paths {"/config.json" {:headers {"Content-Type" "application/json"}
|
||||
:status 200
|
||||
:body (config-json $)}}))]
|
||||
(ring/routes
|
||||
|
|
|
|||
Loading…
Reference in a new issue