add missing source map ...

This commit is contained in:
jem 2020-04-24 15:27:41 +02:00
parent f6b9d4146a
commit 5fa832ecdb
2 changed files with 11 additions and 11 deletions

View file

@ -6,7 +6,7 @@ Embeds mastodon timline into a html page. Uses JS, no intermediate server requir
sudo npm install -g npx sudo npm install -g npx
sudo npm install -g shadow-cljs sudo npm install -g shadow-cljs
npm install source-map-support npm install source-map-support --save-dev
npm install mastodon-api npm install mastodon-api
# Development # Development

View file

@ -1,21 +1,21 @@
(ns dda.masto-embed.app (ns dda.masto-embed.app
(:require ["mastodon-api" :as Mastodon] (:require ["mastodon-api" :as Mastodon]
[clojure.pprint :as pprint :refer [pprint]] [clojure.pprint :as pprint :refer [pprint]]
[cljs.core.async :refer [go]] [cljs.core.async :refer [go]]
[cljs.core.async.interop :refer-macros [<p!]])) [cljs.core.async.interop :refer-macros [<p!]]))
(defn get-content-seq [response] (defn get-content-seq [response]
(map (map
#(aget % "content") #(aget % "content")
(array-seq (array-seq
(aget response "data")))) (aget response "data"))))
(defn init [] (defn init []
(let [config (js-obj "api_url" "https://social.meissa-gmbh.de/api/v1/" "access_token" "...") (let [config (js-obj "api_url" "https://social.meissa-gmbh.de/api/v1/" "access_token" "...")
masto (new Mastodon config) masto (new Mastodon config)
rest-endpoint "accounts/:id/statuses" rest-endpoint "accounts/:id/statuses"
id-config (js-obj "id" "2")] id-config (js-obj "id" "2")]
(pprint (pprint
(go (go
(let [response (<p! (.get masto rest-endpoint id-config))] (let [response (<p! (.get masto rest-endpoint id-config))]
(get-content-seq response)))))) (get-content-seq response))))))