1
0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-05-25 04:46:11 +02:00

Move share link mutations to commands

This commit is contained in:
Andrey Antukh 2023-01-18 10:48:58 +01:00
parent 4258a840ac
commit 1e1f551383
7 changed files with 88 additions and 36 deletions
backend/src/app/rpc/commands

View file

@ -28,7 +28,6 @@
[app.rpc.doc :as-alias doc]
[app.rpc.helpers :as rph]
[app.rpc.permissions :as perms]
[app.rpc.queries.share-link :refer [retrieve-share-link]]
[app.util.blob :as blob]
[app.util.pointer-map :as pmap]
[app.util.services :as sv]
@ -128,7 +127,9 @@
([conn profile-id file-id share-id]
(let [perms (get-permissions conn profile-id file-id)
ldata (retrieve-share-link conn file-id share-id)]
ldata (some-> (db/get* conn :share-link {:id share-id :file-id file-id})
(dissoc :flags)
(update :pages db/decode-pgarray #{}))]
;; NOTE: in a future when share-link becomes more powerful and
;; will allow us specify which parts of the app is available, we