Improves IOL. Adds saved queries. Adds expected deposits in app.

This commit is contained in:
2021-06-04 10:50:27 -07:00
parent 311b07543c
commit 922c449bb0
15 changed files with 256 additions and 82 deletions

View File

@@ -23,7 +23,7 @@
(defn fetch-catalog [i]
(if i
(do
(try
(log/info "looking up catalog for" (str "https://connect.squareup.com/v2/catalog/object/" i))
(->> (client/get (str "https://connect.squareup.com/v2/catalog/object/" i)
{:headers {"Square-Version" "2020-08-12"
@@ -32,7 +32,10 @@
:query-params {"include_related_items" "true"}
:as :json})
:body
:object))
:object)
(catch Exception e
(log/error e)
nil))
(log/warn "Trying to look up non existant ")))
(def fetch-catalog-fast (memoize fetch-catalog))