mirror of
https://github.com/penpot/penpot.git
synced 2025-06-12 22:21:38 +02:00
🐛 Remove feature checking from get-file-data-for-thumbnail rpc method
The prev code has feature resolution race condition and it in reallity does not need that check.
This commit is contained in:
parent
3f85e89f62
commit
05fac41534
2 changed files with 5 additions and 8 deletions
|
@ -180,8 +180,7 @@
|
|||
(def ^:private
|
||||
schema:get-file-data-for-thumbnail
|
||||
[:map {:title "get-file-data-for-thumbnail"}
|
||||
[:file-id ::sm/uuid]
|
||||
[:features {:optional true} ::cfeat/features]])
|
||||
[:file-id ::sm/uuid]])
|
||||
|
||||
(def ^:private
|
||||
schema:partial-file
|
||||
|
@ -211,7 +210,6 @@
|
|||
(fmg/migrate-file)))]
|
||||
|
||||
(-> (cfeat/get-team-enabled-features cf/flags team)
|
||||
(cfeat/check-client-features! (:features params))
|
||||
(cfeat/check-file-features! (:features file)))
|
||||
|
||||
{:file-id file-id
|
||||
|
|
|
@ -42,12 +42,11 @@
|
|||
:http-body body})))
|
||||
|
||||
(defn- request-data-for-thumbnail
|
||||
[file-id revn features]
|
||||
[file-id revn]
|
||||
(let [path "api/rpc/command/get-file-data-for-thumbnail"
|
||||
params {:file-id file-id
|
||||
:revn revn
|
||||
:strip-frames-with-thumbnails true
|
||||
:features features}
|
||||
:strip-frames-with-thumbnails true}
|
||||
request {:method :get
|
||||
:uri (u/join cf/public-uri path)
|
||||
:credentials "include"
|
||||
|
@ -86,6 +85,6 @@
|
|||
nil)))
|
||||
|
||||
(defmethod impl/handler :thumbnails/generate-for-file
|
||||
[{:keys [file-id revn features] :as message} _]
|
||||
(->> (request-data-for-thumbnail file-id revn features)
|
||||
[{:keys [file-id revn] :as message} _]
|
||||
(->> (request-data-for-thumbnail file-id revn)
|
||||
(rx/map render-thumbnail)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue