Skip to content

Commit

Permalink
Play/pause stubs ready
Browse files Browse the repository at this point in the history
  • Loading branch information
INGSOL committed Sep 4, 2018
1 parent be9019a commit de7a94a
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions client/src/cljs/cse_client/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit de7a94a

Please sign in to comment.