Fixes
This commit is contained in:
@@ -458,17 +458,24 @@
|
||||
{:client/square-locations [:db/id :square-location/name :square-location/square-id :square-location/client-location]}])
|
||||
|
||||
(defn get-square-clients
|
||||
([] (get-square-clients nil))
|
||||
([code]
|
||||
([]
|
||||
(d/q '[:find [(pull ?c [:db/id
|
||||
:client/code
|
||||
:client/square-auth-token
|
||||
{:client/square-locations [:db/id :square-location/name :square-location/square-id :square-location/client-location]}]) ...]
|
||||
:in $ ?code
|
||||
:in $
|
||||
:where [?c :client/square-auth-token]]
|
||||
(d/db conn)))
|
||||
([ & codes]
|
||||
(d/q '[:find [(pull ?c [:db/id
|
||||
:client/code
|
||||
:client/square-auth-token
|
||||
{:client/square-locations [:db/id :square-location/name :square-location/square-id :square-location/client-location]}]) ...]
|
||||
:in $ [?code ...]
|
||||
:where [?c :client/square-auth-token]
|
||||
[?c :client/code ?code]]
|
||||
(d/db conn)
|
||||
code)))
|
||||
codes)))
|
||||
|
||||
(defn upsert-locations
|
||||
([] (doseq [client (get-square-clients)]
|
||||
|
||||
Reference in New Issue
Block a user