From 944ebaa8f76d4f8a10fff952f09393f8a01cd4d5 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 15 Mar 2016 21:01:45 +0200 Subject: [PATCH] Add missing projects repository impl. --- src/uxbox/repo/projects.cljs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/uxbox/repo/projects.cljs diff --git a/src/uxbox/repo/projects.cljs b/src/uxbox/repo/projects.cljs new file mode 100644 index 000000000..a222de229 --- /dev/null +++ b/src/uxbox/repo/projects.cljs @@ -0,0 +1,27 @@ +;; This Source Code Form is subject to the terms of the Mozilla Public +;; License, v. 2.0. If a copy of the MPL was not distributed with this +;; file, You can obtain one at http://mozilla.org/MPL/2.0/. +;; +;; Copyright (c) 2016 Andrey Antukh + +(ns uxbox.repo.projects + "A main interface for access to remote resources." + (:refer-clojure :exclude [do]) + (:require [httpurr.client.xhr :as http] + [httpurr.status :as http.status] + [promesa.core :as p :include-macros true] + [beicon.core :as rx] + [uxbox.repo.core :as urc] + [uxbox.state :as ust])) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Login +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(defmethod urc/-do :fetch/projects + [type data] + (urc/req! {:url (str urc/+uri+ "/projects") :method :get})) + +(defmethod urc/-do :fetch/pages + [type data] + (urc/req! {:url (str urc/+uri+ "/pages") :method :get}))