From 54de896c6cefcee89af00db90ef85cca069149ed Mon Sep 17 00:00:00 2001 From: Bryce Covert Date: Wed, 6 Apr 2022 08:29:37 -0700 Subject: [PATCH] dummy fixes --- src/clj/auto_ap/graphql/clients.clj | 5 ++--- src/clj/auto_ap/square/core.clj | 8 -------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/src/clj/auto_ap/graphql/clients.clj b/src/clj/auto_ap/graphql/clients.clj index c604ab5e..f7d89511 100644 --- a/src/clj/auto_ap/graphql/clients.clj +++ b/src/clj/auto_ap/graphql/clients.clj @@ -15,8 +15,7 @@ [clojure.java.io :as io] [amazonica.aws.s3 :as s3] [yang.scheduler :as scheduler] - [mount.core :as mount] - [auto-ap.square.core :as square]) + [mount.core :as mount]) (:import [org.apache.commons.codec.binary Base64] java.util.UUID)) @@ -163,7 +162,7 @@ _ (log/info "upserting client" transactions) result (audit-transact transactions (:id context))] (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) (update :client/location-matches (fn [lms] diff --git a/src/clj/auto_ap/square/core.clj b/src/clj/auto_ap/square/core.clj index ca630da3..5d8093fe 100644 --- a/src/clj/auto_ap/square/core.clj +++ b/src/clj/auto_ap/square/core.clj @@ -1,6 +1,5 @@ (ns auto-ap.square.core (:require [auto-ap.datomic :refer [conn remove-nils]] - [auto-ap.utils :refer [by]] [auto-ap.time :as atime] [clj-http.client :as client] [clj-time.coerce :as coerce] @@ -34,13 +33,6 @@ (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] (try (->> (client/get "https://connect.squareup.com/v2/locations"