mirror of
https://github.com/penpot/penpot.git
synced 2025-02-13 10:38:13 -05:00
Add page create and update repo methods.
This commit is contained in:
parent
3353c69a51
commit
0c4e634c44
1 changed files with 14 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue