mirror of
https://github.com/penpot/penpot.git
synced 2025-08-06 12:38:33 +02: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
|
(defmethod urc/-do :fetch/pages
|
||||||
[type data]
|
[type data]
|
||||||
(urc/req! {:url (str urc/+uri+ "/pages") :method :get}))
|
(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
Add a link
Reference in a new issue