@@ -15,9 +15,16 @@
|
||||
(println "[tbd] nREPL toggle failed:" (.getMessage e))
|
||||
(edn-response 500 {:error (str "could not change nREPL state: " (.getMessage e))})))))
|
||||
|
||||
(defn- status-handler [_req]
|
||||
(edn-response 200 (nrepl/status)))
|
||||
|
||||
(defn routes [config]
|
||||
["/nrepl"
|
||||
{:post {:tags ["admin"]
|
||||
{:get {:tags ["admin"]
|
||||
:summary "Read whether the nREPL debug server is on or off (admin only)"
|
||||
:admin? true
|
||||
:handler status-handler}
|
||||
:post {:tags ["admin"]
|
||||
:summary "Enable or disable the nREPL debug server (admin only)"
|
||||
:admin? true
|
||||
:parameters {:body [:map [:enabled {:description "true starts the server, false stops it"} :boolean]]}
|
||||
|
||||
Reference in New Issue
Block a user