wip
This commit is contained in:
parent
85ef9b8667
commit
2f54b0fddd
3 changed files with 14 additions and 13 deletions
|
@ -8,10 +8,10 @@
|
||||||
[[orchestra "2019.02.06-1"]]
|
[[orchestra "2019.02.06-1"]]
|
||||||
:dev-http {8080 "public"}
|
:dev-http {8080 "public"}
|
||||||
:builds
|
:builds
|
||||||
{:test
|
{:test {:target :node-test
|
||||||
{:target :node-test
|
|
||||||
:output-to "out/node-tests.js"
|
:output-to "out/node-tests.js"
|
||||||
:autorun true}
|
:autorun true}
|
||||||
:frontend
|
:frontend {:target :browser
|
||||||
{:target :browser
|
|
||||||
:modules {:main {:init-fn dda.masto-embed.app/init}}}}}
|
:modules {:main {:init-fn dda.masto-embed.app/init}}}}}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
(exit-with-error error)
|
(exit-with-error error)
|
||||||
(callback response)))))
|
(callback response)))))
|
||||||
|
|
||||||
(defn-spec get-directory any?
|
(defn-spec get-directory-old any?
|
||||||
[host-url ::host-url
|
[host-url ::host-url
|
||||||
callback fn?]
|
callback fn?]
|
||||||
(.then (.get (mastodon-client host-url)
|
(.then (.get (mastodon-client host-url)
|
||||||
|
@ -60,7 +60,7 @@
|
||||||
#(let [response (-> % .-data js->edn)]
|
#(let [response (-> % .-data js->edn)]
|
||||||
(callback response))))
|
(callback response))))
|
||||||
|
|
||||||
(defn-spec get-directory2 any?
|
(defn-spec get-directory any?
|
||||||
[host-url ::host-url]
|
[host-url ::host-url]
|
||||||
(go (let [result (<p! (.get (mastodon-client host-url)
|
(go (let [result (<p! (.get (mastodon-client host-url)
|
||||||
(str "directory?local=true")
|
(str "directory?local=true")
|
||||||
|
|
|
@ -77,7 +77,8 @@
|
||||||
account-id
|
account-id
|
||||||
render-to-document))))
|
render-to-document))))
|
||||||
|
|
||||||
(go
|
(defn main []
|
||||||
(let
|
(go
|
||||||
[result (<p! (api/get-directory "https://social.meissa-gmbh.de"))]
|
(let [account-id (<! (find-account-id "https://social.meissa-gmbh.de" "team"))]
|
||||||
result))
|
(print account-id)
|
||||||
|
)))
|
||||||
|
|
Loading…
Reference in a new issue