mirror of
https://github.com/penpot/penpot.git
synced 2026-04-30 05:38:42 +00:00
Add page create and update repo methods.
This commit is contained in:
parent
3353c69a51
commit
0c4e634c44
@ -25,3 +25,17 @@
|
||||
(defmethod urc/-do :fetch/pages
|
||||
[type data]
|
||||
(urc/req! {:url (str urc/+uri+ "/pages") :method :get}))
|
||||
|
||||
(defmethod urc/-do :create/page
|
||||
[type {:keys [id] :as data}]
|
||||
(let [params {:url (str urc/+uri+ "/pages")
|
||||
:method :post
|
||||
:body data}]
|
||||
(urc/req! params)))
|
||||
|
||||
(defmethod urc/-do :update/page
|
||||
[type {:keys [id] :as data}]
|
||||
(let [params {:url (str urc/+uri+ "/pages/" id)
|
||||
:method :put
|
||||
:body data}]
|
||||
(urc/req! params)))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user