mirror of
https://github.com/penpot/penpot.git
synced 2025-05-19 13:16:10 +02:00
🐛 Fix metrics and doc endpoints
This commit is contained in:
parent
408de63ea3
commit
08c6ebe10c
2 changed files with 9 additions and 9 deletions
|
@ -89,12 +89,12 @@
|
|||
|
||||
|
||||
(defn- handler
|
||||
[registry _ respond _]
|
||||
[registry _]
|
||||
(let [samples (.metricFamilySamples ^CollectorRegistry registry)
|
||||
writer (StringWriter.)]
|
||||
(TextFormat/write004 writer samples)
|
||||
(respond {:headers {"content-type" TextFormat/CONTENT_TYPE_004}
|
||||
:body (.toString writer)})))
|
||||
{:headers {"content-type" TextFormat/CONTENT_TYPE_004}
|
||||
:body (.toString writer)}))
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -65,12 +65,12 @@
|
|||
[methods]
|
||||
(if (contains? cf/flags :backend-api-doc)
|
||||
(let [context (prepare-context methods)]
|
||||
(fn [_ respond _]
|
||||
(respond {::yrs/status 200
|
||||
::yrs/body (-> (io/resource "app/templates/api-doc.tmpl")
|
||||
(tmpl/render context))})))
|
||||
(fn [_ respond _]
|
||||
(respond {::yrs/status 404}))))
|
||||
(fn [_]
|
||||
{::yrs/status 200
|
||||
::yrs/body (-> (io/resource "app/templates/api-doc.tmpl")
|
||||
(tmpl/render context))}))
|
||||
(fn [_]
|
||||
{::yrs/status 404})))
|
||||
|
||||
(s/def ::routes vector?)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue