mirror of
https://github.com/penpot/penpot.git
synced 2025-06-12 12:21:41 +02:00
🐛 Fix dashboard grid thumbnails cache invalidation.
This commit is contained in:
parent
7afb3e2c6d
commit
eb4e7e0f0c
2 changed files with 35 additions and 27 deletions
|
@ -165,6 +165,7 @@
|
|||
f.created_at,
|
||||
f.modified_at,
|
||||
f.name,
|
||||
f.revn,
|
||||
f.is_shared
|
||||
from file as f
|
||||
where f.project_id = ?
|
||||
|
@ -214,9 +215,6 @@
|
|||
(some-> (retrieve-file cfg id)
|
||||
(assoc :permissions perms)))))
|
||||
|
||||
(s/def ::page
|
||||
(s/keys :req-un [::profile-id ::file-id]))
|
||||
|
||||
(defn remove-thumbnails-frames
|
||||
"Removes from data the children for frames that have a thumbnail set up"
|
||||
[data]
|
||||
|
@ -244,7 +242,12 @@
|
|||
|
||||
(update data :objects update-objects)))
|
||||
|
||||
(s/def ::page
|
||||
(s/keys :req-un [::profile-id ::file-id]))
|
||||
|
||||
(sv/defmethod ::page
|
||||
"Retrieves the first page of the file. Used mainly for render
|
||||
thumbnails on dashboard."
|
||||
[{:keys [pool] :as cfg} {:keys [profile-id file-id strip-thumbnails]}]
|
||||
(db/with-atomic [conn pool]
|
||||
(check-read-permissions! conn profile-id file-id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue