Strip newline from auth token file

This commit is contained in:
niten 2022-06-20 15:53:52 -07:00
parent 30637bdead
commit 9267239983
1 changed files with 4 additions and 7 deletions

View File

@ -193,12 +193,6 @@
"available: " (pprint-to-string resolved)))
:else resolved)))
(defn pthru [label o]
(println (str "************ START " label))
(clojure.pprint/pprint o)
(println (str "************ END " label))
o)
(defn -main [& args]
(let [required-keys [:exchange-host
:currency
@ -212,7 +206,10 @@
bebot-auth-token-file
bebot-channel-id
notify-user]} (get-args required-keys args)]
(let [logger (bebot-log/make-logger bebot-url (pthru "AUTH_TOKEN" (slurp bebot-auth-token-file)) bebot-channel-id notify-user)
(let [logger (bebot-log/make-logger bebot-url
(-> bebot-auth-token-file slurp str/trim-newline)
bebot-channel-id
notify-user)
checks (create-checks logger)
bot (reify-bot exchange-host (-> currency str/lower-case keyword))
shutdown (chan)]