ability to approve

This commit is contained in:
Bryce Covert
2017-12-09 08:26:52 -08:00
parent 36cac4a023
commit bc6db905a5
6 changed files with 59 additions and 4 deletions

View 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)))))