From de7a94a8351eaa1af2b734756c621572a4c08db5 Mon Sep 17 00:00:00 2001 From: INGSOL Date: Tue, 28 Aug 2018 15:22:48 +0200 Subject: [PATCH] Play/pause stubs ready --- client/src/cljs/cse_client/core.cljs | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/client/src/cljs/cse_client/core.cljs b/client/src/cljs/cse_client/core.cljs index d77c852..e56704c 100644 --- a/client/src/cljs/cse_client/core.cljs +++ b/client/src/cljs/cse_client/core.cljs @@ -24,17 +24,19 @@ (fn [{:keys [db]} [state]] {:db (assoc db :state state)})) -(rf/reg-event-fx :play - (fn [_ _] - {:http-xhrio {:method :get - :uri "/play" - :response-format (ajax/json-response-format {:keywords? true})}})) - -(rf/reg-event-fx :pause - (fn [_ _] - {:http-xhrio {:method :get - :uri "/pause" - :response-format (ajax/json-response-format {:keywords? true})}})) +(k/reg-chain :play + (fn [_ _] + {:http-xhrio {:method :get + :uri "/play" + :response-format (ajax/json-response-format {:keywords? true})}}) + (fn [_ _])) + +(k/reg-chain :pause + (fn [_ _] + {:http-xhrio {:method :get + :uri "/pause" + :response-format (ajax/json-response-format {:keywords? true})}}) + (fn [_ _])) (rf/reg-sub :state :state)