Merge remote-tracking branch 'origin/staging' into develop

This commit is contained in:
Andrey Antukh 2023-07-31 11:13:40 +02:00
commit a64cb47afb
21 changed files with 81 additions and 45 deletions

View file

@ -28,7 +28,8 @@
[app.util.services :as sv]
[app.util.time :as dt]
[clojure.spec.alpha :as s]
[clojure.walk :as walk]))
[clojure.walk :as walk]
[promesa.exec :as px]))
;; --- COMMAND: Duplicate File
@ -322,6 +323,18 @@
;; delete possible broken relations on moved files
(db/exec-one! conn [sql:delete-broken-relations pids])
;; Update the modification date of the all affected projects
;; ensuring that the destination project is the most recent one.
(doseq [project-id (into (list project-id) source)]
;; NOTE: as this is executed on virtual thread, sleeping does
;; not causes major issues, and allows an easy way to set a
;; trully different modification date to each file.
(px/sleep 10)
(db/update! conn :project
{:modified-at (dt/now)}
{:id project-id}))
nil))
(s/def ::ids (s/every ::us/uuid :kind set?))
@ -423,9 +436,9 @@
{::doc/added "1.10"
::doc/deprecated "1.19"}
[cfg _params]
(mapv #(select-keys % [:id :name :thumbnail-uri]) (::setup/templates cfg)))
(mapv #(select-keys % [:id :name]) (::setup/templates cfg)))
(sv/defmethod ::get-builtin-templates
{::doc/added "1.19"}
[cfg _params]
(mapv #(select-keys % [:id :name :thumbnail-uri]) (::setup/templates cfg)))
(mapv #(select-keys % [:id :name]) (::setup/templates cfg)))

View file

@ -23,7 +23,6 @@
[:map {:title "Template"}
[:id ::sm/word-string]
[:name ::sm/word-string]
[:thumbnail-uri ::sm/word-string]
[:file-uri ::sm/word-string]])
(def ^:private schema:templates