0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-10 00:40:30 -05:00

Add create/delete project repository methods.

This commit is contained in:
Andrey Antukh 2016-03-17 22:23:29 +02:00
parent 87adadd445
commit 63bcae9dc1

View file

@ -26,6 +26,19 @@
[type data]
(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
[type {:keys [id] :as data}]
(let [params {:url (str urc/url "/pages")