Skip to content
Snippets Groups Projects
Commit beb30f25 authored by Allen Gilliland's avatar Allen Gilliland
Browse files

publish events for :dashboard-read and :card-read

parent e6997ec0
No related branches found
No related tags found
No related merge requests found
......@@ -79,7 +79,10 @@
[id]
(->404 (Card id)
read-check
(hydrate :creator :can_read :can_write :dashboard_count)))
(hydrate :creator :can_read :can_write :dashboard_count)
(assoc :actor_id *current-user-id*)
(->> (events/publish-event :card-read))
(dissoc :actor_id)))
(defendpoint PUT "/:id"
"Update a `Card`."
......
......@@ -42,7 +42,10 @@
[id]
(let-404 [db (-> (Dashboard id)
read-check
(hydrate :creator [:ordered_cards [:card :creator]] :can_read :can_write))]
(hydrate :creator [:ordered_cards [:card :creator]] :can_read :can_write)
(assoc :actor_id *current-user-id*)
(->> (events/publish-event :dashboard-read))
(dissoc :actor_id))]
{:dashboard db})) ; why is this returned with this {:dashboard} wrapper?
(defendpoint PUT "/: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