using tokens now
This commit is contained in:
parent
15b952865f
commit
afa54c2e5a
|
@ -1 +0,0 @@
|
||||||
/nix/store/g78hiahkl0j6wi51mb6vvp94f7b8lc6v-source
|
|
|
@ -1648,3 +1648,4 @@ export TMP="$NIX_BUILD_TOP"
|
||||||
export TMPDIR="$NIX_BUILD_TOP"
|
export TMPDIR="$NIX_BUILD_TOP"
|
||||||
export TEMP="$NIX_BUILD_TOP"
|
export TEMP="$NIX_BUILD_TOP"
|
||||||
export TEMPDIR="$NIX_BUILD_TOP"
|
export TEMPDIR="$NIX_BUILD_TOP"
|
||||||
|
eval "$shellHook"
|
||||||
|
|
3
main.clj
3
main.clj
|
@ -33,7 +33,7 @@
|
||||||
(clojure.string/replace "+" "-"))]
|
(clojure.string/replace "+" "-"))]
|
||||||
(str header "." payload "." signature))))
|
(str header "." payload "." signature))))
|
||||||
|
|
||||||
(let [token (generate-token (System/getenv secret-token))
|
(let [token (generate-token (System/getenv "token"))
|
||||||
data (-> (curl/get "http://links.mossnet.lan/api/v1/links?searchtags=music" {:headers {"Authorization" (str "Bearer " token)}})
|
data (-> (curl/get "http://links.mossnet.lan/api/v1/links?searchtags=music" {:headers {"Authorization" (str "Bearer " token)}})
|
||||||
(:body)
|
(:body)
|
||||||
(json/parse-string true))
|
(json/parse-string true))
|
||||||
|
@ -41,7 +41,6 @@
|
||||||
filtered-data (mapv (filter (fn [x] (contains? "bandcamp" (get x :url)))) data)]
|
filtered-data (mapv (filter (fn [x] (contains? "bandcamp" (get x :url)))) data)]
|
||||||
filtered-data)
|
filtered-data)
|
||||||
|
|
||||||
|
|
||||||
(comment
|
(comment
|
||||||
(println "somestring")
|
(println "somestring")
|
||||||
(.getBytes (str {"iat" (sh "date" "-u" "+%s")}))
|
(.getBytes (str {"iat" (sh "date" "-u" "+%s")}))
|
||||||
|
|
Loading…
Reference in a new issue