From 7359e4570b1a986a482e0f0989aa14dd305dae39 Mon Sep 17 00:00:00 2001 From: niten Date: Tue, 21 Mar 2023 22:25:22 -0700 Subject: [PATCH] Fixed synology requests. Fuck it's inconsistent. --- src/suanni/syno_client.clj | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/src/suanni/syno_client.clj b/src/suanni/syno_client.clj index 79ab5cb..ab66045 100644 --- a/src/suanni/syno_client.clj +++ b/src/suanni/syno_client.clj @@ -10,6 +10,8 @@ [clojure.string :as str]) (:import java.net.InetAddress)) +(defn pthru [o] (clojure.pprint/pprint o) o) + ;; ## Protocols ;; ### BaseSynoClient @@ -92,18 +94,18 @@ (get! conn (-> (req/base-request) (req/with-path (format "/webapi/%s" path)) - (req/withQueryParams - { - :version maxVersion - :session :SurveillanceStation - :api :SYNO.API.Auth - :method :login - :account account - :passwd passwd - :format :sid - :enable_device_token true - :device_name (get-hostname) - }))))) + (req/with-query-params + { + :version maxVersion + :session :SurveillanceStation + :api :SYNO.API.Auth + :method :login + :account account + :passwd passwd + :format :sid + :enable_device_token true + :device_name (get-hostname) + }))))) (defn- perform-request! [http-client req] (result/bind (client/execute-request! http-client req)