Skip to content

Commit

Permalink
change matching logic
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushgaud committed Nov 15, 2023
1 parent 28e5943 commit c3eef89
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/wrike_ist/wrike.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,12 @@
(get-in ["data" 0 "title"]))]
(.info js/console (str "Folder ID: " folder-id))
(.info js/console (str "Folder Title: " title))
(let [parent-ids (-> response
(let [lowercase-folder-names (map clojure.string/lower-case folder-names)
parent-ids (-> response
(get-in ["data" 0 "parentIds"])
(or []))]
(.info js/console (str "Parent IDs: " parent-ids))
(if (some #(contains? title %) folder-names)
(if (some #(= title %) lowercase-folder-names)
(do
(.info js/console (str "Match found for folder: " title))
(js/Promise.resolve true))
Expand Down

0 comments on commit c3eef89

Please sign in to comment.