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

View file

@ -27,7 +27,7 @@
(ptk/reify ::create-share-link
ptk/WatchEvent
(watch [_ _ _]
(->> (rp/mutation! :create-share-link params)
(->> (rp/cmd! :create-share-link params)
(rx/map share-link-created)))))
(defn delete-share-link
@ -41,6 +41,6 @@
ptk/WatchEvent
(watch [_ _ _]
(->> (rp/mutation! :delete-share-link {:id id})
(->> (rp/cmd! :delete-share-link {:id id})
(rx/ignore)))))