Add info in modal

This commit is contained in:
Eva 2022-07-01 07:50:44 +02:00 committed by Andrés Moya
parent a5bf1c03e7
commit c108974ad2
19 changed files with 327 additions and 58 deletions

View file

@ -384,7 +384,7 @@
(s/def ::file-data-for-thumbnail
(s/keys :req-un [::profile-id ::file-id]
:opt-in [::components-v2]))
:opt-un [::components-v2]))
(sv/defmethod ::file-data-for-thumbnail
"Retrieves the data for generate the thumbnail of the file. Used
@ -464,6 +464,24 @@
(check-read-permissions! pool profile-id file-id)
(retrieve-file-libraries cfg false file-id))
;; --- Query: Files that use this File library
(def ^:private sql:library-using-files
"SELECT f.id,
f.name
FROM file_library_rel AS flr
INNER JOIN file AS f ON f.id = flr.file_id
WHERE flr.library_file_id = ?;")
(s/def ::library-using-files
(s/keys :req-un [::profile-id ::file-id]))
(sv/defmethod ::library-using-files
[{:keys [pool] :as cfg} {:keys [profile-id file-id] :as params}]
(check-read-permissions! pool profile-id file-id)
(db/exec! pool [sql:library-using-files file-id]))
;; --- QUERY: team-recent-files
(def sql:team-recent-files