Skip to content
Snippets Groups Projects
Commit 4d1d700f authored by Lewis Liu's avatar Lewis Liu
Browse files

Updated last instance of render-pulse-card

parent 6449c1f2
No related branches found
No related tags found
No related merge requests found
......@@ -45,8 +45,8 @@
"Create an attachment in Slack for a given Card by rendering its result into an image and uploading it."
[card-results]
(when-let [{channel-id :id} (slack/get-or-create-files-channel!)]
(doall (for [{{card-id :id, card-name :name, :as card} :card, {:keys [data]} :result} card-results]
(let [image-byte-array (render/render-pulse-card-to-png card data)
(doall (for [{{card-id :id, card-name :name, :as card} :card, result :result} card-results]
(let [image-byte-array (render/render-pulse-card-to-png card result)
slack-file-url (slack/upload-file! image-byte-array "image.png" channel-id)]
{:title card-name
:title_link (urls/card-url card-id)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment