0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-13 16:21:57 -05:00

📎 Minor changes on debug ns.

This commit is contained in:
Andrey Antukh 2021-12-30 12:03:34 +01:00
parent 87690a534c
commit a096b0777f

View file

@ -48,13 +48,13 @@
(str/includes? revn ":")
(let [[start end] (->> (str/split revn #":")
(map d/read-string))
_ (prn "fofof" start end)
items (db/exec! pool [sql:retrieve-range-of-changes
id start end])
items (->> items
(map :changes)
(map blob/decode)
(mapcat identity))]
(mapcat identity)
(vec))]
{:status 200
:headers {"content-type" "application/transit+json"}
:body (-> items
@ -63,15 +63,12 @@
(d/num-string? revn)
(let [item (db/exec-one! pool [sql:retrieve-single-change id (d/read-string revn)])
_ (prn "KAKAKAKA")
_ (clojure.pprint/pprint item)
item (-> item
:changes
blob/decode)]
{:status 200
:headers {"content-type" "application/transit+json"}
:body (-> item
:body (-> (into [] item)
(t/encode-str {:type :json-verbose})
(cond-> wrap? (json/write)))})