mirror of
https://github.com/penpot/penpot.git
synced 2025-05-05 21:45:54 +02:00
📎 Minor changes on debug ns.
This commit is contained in:
parent
87690a534c
commit
a096b0777f
1 changed files with 3 additions and 6 deletions
|
@ -48,13 +48,13 @@
|
||||||
(str/includes? revn ":")
|
(str/includes? revn ":")
|
||||||
(let [[start end] (->> (str/split revn #":")
|
(let [[start end] (->> (str/split revn #":")
|
||||||
(map d/read-string))
|
(map d/read-string))
|
||||||
_ (prn "fofof" start end)
|
|
||||||
items (db/exec! pool [sql:retrieve-range-of-changes
|
items (db/exec! pool [sql:retrieve-range-of-changes
|
||||||
id start end])
|
id start end])
|
||||||
items (->> items
|
items (->> items
|
||||||
(map :changes)
|
(map :changes)
|
||||||
(map blob/decode)
|
(map blob/decode)
|
||||||
(mapcat identity))]
|
(mapcat identity)
|
||||||
|
(vec))]
|
||||||
{:status 200
|
{:status 200
|
||||||
:headers {"content-type" "application/transit+json"}
|
:headers {"content-type" "application/transit+json"}
|
||||||
:body (-> items
|
:body (-> items
|
||||||
|
@ -63,15 +63,12 @@
|
||||||
|
|
||||||
(d/num-string? revn)
|
(d/num-string? revn)
|
||||||
(let [item (db/exec-one! pool [sql:retrieve-single-change id (d/read-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
|
item (-> item
|
||||||
:changes
|
:changes
|
||||||
blob/decode)]
|
blob/decode)]
|
||||||
{:status 200
|
{:status 200
|
||||||
:headers {"content-type" "application/transit+json"}
|
:headers {"content-type" "application/transit+json"}
|
||||||
:body (-> item
|
:body (-> (into [] item)
|
||||||
(t/encode-str {:type :json-verbose})
|
(t/encode-str {:type :json-verbose})
|
||||||
(cond-> wrap? (json/write)))})
|
(cond-> wrap? (json/write)))})
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue