ability to approve
This commit is contained in:
24
src/cljs/auto_ap/effects.cljs
Normal file
24
src/cljs/auto_ap/effects.cljs
Normal file
@@ -0,0 +1,24 @@
|
||||
(ns auto-ap.effects
|
||||
(:require-macros [cljs.core.async.macros :refer [go]])
|
||||
(:require [re-frame.core :as re-frame]
|
||||
[reagent.core :as reagent]
|
||||
[auto-ap.subs :as subs]
|
||||
[auto-ap.events :as events]
|
||||
[cljs.reader :as edn]
|
||||
[cljsjs.dropzone :as dz]
|
||||
[auto-ap.routes :as routes]
|
||||
[bidi.bidi :as bidi]
|
||||
[cljs-http.client :as http]
|
||||
[cljs.core.async :refer [<!]]))
|
||||
|
||||
|
||||
(re-frame/reg-fx
|
||||
:http
|
||||
(fn [{:keys [method uri on-success]}]
|
||||
(go
|
||||
(->> (http/request {:method method
|
||||
:url uri})
|
||||
(<! )
|
||||
:body
|
||||
(conj [on-success])
|
||||
(re-frame/dispatch)))))
|
||||
Reference in New Issue
Block a user