Fixed synology requests.

Fuck it's inconsistent.
This commit is contained in:
niten 2023-03-21 22:25:22 -07:00
parent 9b889c95e7
commit 7359e4570b
1 changed files with 14 additions and 12 deletions

View File

@ -10,6 +10,8 @@
[clojure.string :as str]) [clojure.string :as str])
(:import java.net.InetAddress)) (:import java.net.InetAddress))
(defn pthru [o] (clojure.pprint/pprint o) o)
;; ## Protocols ;; ## Protocols
;; ### BaseSynoClient ;; ### BaseSynoClient
@ -92,18 +94,18 @@
(get! conn (get! conn
(-> (req/base-request) (-> (req/base-request)
(req/with-path (format "/webapi/%s" path)) (req/with-path (format "/webapi/%s" path))
(req/withQueryParams (req/with-query-params
{ {
:version maxVersion :version maxVersion
:session :SurveillanceStation :session :SurveillanceStation
:api :SYNO.API.Auth :api :SYNO.API.Auth
:method :login :method :login
:account account :account account
:passwd passwd :passwd passwd
:format :sid :format :sid
:enable_device_token true :enable_device_token true
:device_name (get-hostname) :device_name (get-hostname)
}))))) })))))
(defn- perform-request! [http-client req] (defn- perform-request! [http-client req]
(result/bind (client/execute-request! http-client req) (result/bind (client/execute-request! http-client req)