dummy fixes
This commit is contained in:
@@ -15,8 +15,7 @@
|
|||||||
[clojure.java.io :as io]
|
[clojure.java.io :as io]
|
||||||
[amazonica.aws.s3 :as s3]
|
[amazonica.aws.s3 :as s3]
|
||||||
[yang.scheduler :as scheduler]
|
[yang.scheduler :as scheduler]
|
||||||
[mount.core :as mount]
|
[mount.core :as mount])
|
||||||
[auto-ap.square.core :as square])
|
|
||||||
(:import [org.apache.commons.codec.binary Base64]
|
(:import [org.apache.commons.codec.binary Base64]
|
||||||
java.util.UUID))
|
java.util.UUID))
|
||||||
|
|
||||||
@@ -163,7 +162,7 @@
|
|||||||
_ (log/info "upserting client" transactions)
|
_ (log/info "upserting client" transactions)
|
||||||
result (audit-transact transactions (:id context))]
|
result (audit-transact transactions (:id context))]
|
||||||
(when (:square_auth_token edit_client)
|
(when (:square_auth_token edit_client)
|
||||||
(square/upsert-locations [(-> result :tempids (get id) (or id) d-clients/get-by-id)]))
|
(square/upsert-locations (-> result :tempids (get id) (or id) d-clients/get-by-id)))
|
||||||
(-> (-> result :tempids (get id) (or id) d-clients/get-by-id)
|
(-> (-> result :tempids (get id) (or id) d-clients/get-by-id)
|
||||||
(update :client/location-matches
|
(update :client/location-matches
|
||||||
(fn [lms]
|
(fn [lms]
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
(ns auto-ap.square.core
|
(ns auto-ap.square.core
|
||||||
(:require [auto-ap.datomic :refer [conn remove-nils]]
|
(:require [auto-ap.datomic :refer [conn remove-nils]]
|
||||||
[auto-ap.utils :refer [by]]
|
|
||||||
[auto-ap.time :as atime]
|
[auto-ap.time :as atime]
|
||||||
[clj-http.client :as client]
|
[clj-http.client :as client]
|
||||||
[clj-time.coerce :as coerce]
|
[clj-time.coerce :as coerce]
|
||||||
@@ -34,13 +33,6 @@
|
|||||||
|
|
||||||
(atime/unparse (time/plus d (time/days 5)) atime/iso-date)]))))
|
(atime/unparse (time/plus d (time/days 5)) atime/iso-date)]))))
|
||||||
|
|
||||||
(defn locations [client]
|
|
||||||
(->> (client/get "https://connect.squareup.com/v2/locations"
|
|
||||||
{:headers (base-headers client)
|
|
||||||
:as :json})
|
|
||||||
:body
|
|
||||||
:locations))
|
|
||||||
|
|
||||||
(defn client-locations [client]
|
(defn client-locations [client]
|
||||||
(try
|
(try
|
||||||
(->> (client/get "https://connect.squareup.com/v2/locations"
|
(->> (client/get "https://connect.squareup.com/v2/locations"
|
||||||
|
|||||||
Reference in New Issue
Block a user