add nrepl GET
CI / Test + coverage (push) Successful in 58s

This commit is contained in:
2026-09-19 07:36:06 -09:00
parent d9499594bf
commit 6ff03a45f7
3 changed files with 37 additions and 3 deletions
+8 -1
View File
@@ -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]]}