mirror of
https://github.com/penpot/penpot.git
synced 2025-01-24 23:49:45 -05:00
Add create/delete project repository methods.
This commit is contained in:
parent
87adadd445
commit
63bcae9dc1
1 changed files with 13 additions and 0 deletions
|
@ -26,6 +26,19 @@
|
||||||
[type data]
|
[type data]
|
||||||
(urc/req! {:url (str urc/url "/pages") :method :get}))
|
(urc/req! {:url (str urc/url "/pages") :method :get}))
|
||||||
|
|
||||||
|
(defmethod urc/-do :create/project
|
||||||
|
[_ data]
|
||||||
|
(let [params {:url (str urc/url "/projects")
|
||||||
|
:method :post
|
||||||
|
:body data}]
|
||||||
|
(urc/req! params)))
|
||||||
|
|
||||||
|
(defmethod urc/-do :delete/project
|
||||||
|
[_ {:keys [id]}]
|
||||||
|
(let [params {:url (str urc/url "/projects/" id)
|
||||||
|
:method :delete}]
|
||||||
|
(urc/req! params)))
|
||||||
|
|
||||||
(defmethod urc/-do :create/page
|
(defmethod urc/-do :create/page
|
||||||
[type {:keys [id] :as data}]
|
[type {:keys [id] :as data}]
|
||||||
(let [params {:url (str urc/url "/pages")
|
(let [params {:url (str urc/url "/pages")
|
||||||
|
|
Loading…
Add table
Reference in a new issue