mirror of
https://github.com/penpot/penpot.git
synced 2026-09-25 13:26:16 +00:00
✨ Add mark-file-as-trimmed srepl helper
This commit is contained in:
parent
7a44426c4b
commit
35a4672329
@ -531,6 +531,18 @@
|
|||||||
(assoc :max-jobs 1)
|
(assoc :max-jobs 1)
|
||||||
(process!))))
|
(process!))))
|
||||||
|
|
||||||
|
|
||||||
|
(defn mark-file-as-trimmed
|
||||||
|
[id]
|
||||||
|
(let [id (h/parse-uuid id)]
|
||||||
|
(db/tx-run! main/system (fn [cfg]
|
||||||
|
(-> (db/update! cfg :file
|
||||||
|
{:has-media-trimmed true}
|
||||||
|
{:id id}
|
||||||
|
{::db/return-keys false})
|
||||||
|
(db/get-update-count)
|
||||||
|
(pos?))))))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; DELETE/RESTORE OBJECTS (WITH CASCADE, SOFT)
|
;; DELETE/RESTORE OBJECTS (WITH CASCADE, SOFT)
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user