Skip to content

Commit

Permalink
show data object
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushgaud committed Nov 14, 2023
1 parent 5c083fe commit 06ba116
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/wrike_ist/wrike.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,14 @@

(defn get-folder-id
[folder-names]
(let [uri (str "https://www.wrike.com/api/v4/folders")]
(let [uri (str "https://www.wrike.com/api/v4/folders?descendants=false")]
(-> (http/get uri {:headers (headers)})
(.then parse-body)
(.then (fn [response]
(let [folder-names (clojure.string/split folder-names #"\s+")]
(.info js/console (str "get-folder-id: Querying for folder names: " folder-names))
(let [data (get response "data" [])
matching-folder-ids (->> data
(mapcat #(get % "children"))
(filter #(contains? folder-names (get % "title")))
(map #(get % "id")))]
(.info js/console (str "get-folder-id: Data object: " data))
Expand Down

0 comments on commit 06ba116

Please sign in to comment.