Add fetch project by token repo functions.

This commit is contained in:
Andrey Antukh 2016-07-09 03:43:46 +03:00
parent 9c37c19647
commit b16bea31f9
No known key found for this signature in database
GPG key ID: 4DFEBCB8316A8B95

View file

@ -15,6 +15,16 @@
(let [url (str url "/projects")] (let [url (str url "/projects")]
(send! {:url url :method :get}))) (send! {:url url :method :get})))
(defmethod request :fetch/project
[_ id]
(let [url (str url "/projects/" id)]
(send! {:url url :method :get})))
(defmethod request :fetch/project-by-token
[_ token]
(let [url (str url "/projects-by-token/" token)]
(send! {:url url :method :get})))
(defmethod request :create/project (defmethod request :create/project
[_ data] [_ data]
(let [params {:url (str url "/projects") (let [params {:url (str url "/projects")