🐛 Fix export from shared prototype

This commit is contained in:
Alejandro Alonso 2023-07-04 11:25:10 +02:00 committed by Alonso Torres
parent 0d87dc5680
commit 009236bbe3
15 changed files with 69 additions and 47 deletions

View file

@ -17,7 +17,7 @@
[promesa.core :as p]))
(defn render
[{:keys [file-id page-id token scale type objects] :as params} on-object]
[{:keys [file-id page-id share-id token scale type objects] :as params} on-object]
(letfn [(prepare-options [uri]
#js {:screen #js {:width bw/default-viewport-width
:height bw/default-viewport-height}
@ -48,9 +48,9 @@
;; take the screnshot of requested objects, one by one
(p/run! (partial render-object page) objects)
nil))]
(p/let [params {:file-id file-id
:page-id page-id
:share-id share-id
:object-id (mapv :id objects)
:route "objects"}
uri (-> (cf/get :public-uri)

View file

@ -17,7 +17,7 @@
[promesa.core :as p]))
(defn render
[{:keys [file-id page-id token scale type objects] :as params} on-object]
[{:keys [file-id page-id share-id token scale type objects] :as params} on-object]
(letfn [(prepare-options [uri]
#js {:screen #js {:width bw/default-viewport-width
:height bw/default-viewport-height}
@ -31,6 +31,7 @@
(prepare-uri [base-uri object-id]
(let [params {:file-id file-id
:page-id page-id
:share-id share-id
:object-id object-id
:route "objects"}]
(-> base-uri

View file

@ -108,7 +108,7 @@
:height height}))
(defn render
[{:keys [page-id file-id objects token scale type]} on-object]
[{:keys [page-id file-id share-id objects token scale type]} on-object]
(letfn [(convert-to-ppm [pngpath]
(let [ppmpath (str/concat pngpath "origin.ppm")]
(l/trace :fn :convert-to-ppm :path ppmpath)
@ -338,9 +338,9 @@
;; take the screnshot of requested objects, one by one
(p/run! (partial render-object page) objects)
nil))]
(p/let [params {:file-id file-id
:page-id page-id
:share-id share-id
:render-embed true
:object-id (mapv :id objects)
:route "objects"}