Revamps all of the IOL's routing, so that the new history page can share with the rest.

This commit is contained in:
2023-01-12 16:56:40 -08:00
parent ce01a63797
commit 46dd191391
29 changed files with 1294 additions and 1053 deletions

View File

@@ -0,0 +1,19 @@
(ns auto-ap.routes.health
(:require [mount.core :as mount]))
(def running? (atom false))
#_{:clj-kondo/ignore [:clojure-lsp/unused-public-var]}
(mount/defstate manage-running?
:start (reset! running? true)
:stop (reset! running? false))
(defn health-check [request]
(if @running?
{:status 200
:body "Ok"}
{:status 503
:body "Application shut down"}))
(def routes {"api/" {"health-check" :health}})
(def match->handler {:health health-check})