From 4cb07b1bd8f95f5b882fcf7cf3c9b71166185217 Mon Sep 17 00:00:00 2001 From: Mike Zornek Date: Mon, 5 Aug 2024 20:53:03 -0400 Subject: [PATCH] Base access on `url_slug`. --- lib/flick_web/live/vote/vote_capture_live.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/flick_web/live/vote/vote_capture_live.ex b/lib/flick_web/live/vote/vote_capture_live.ex index 8c71572..7db6165 100644 --- a/lib/flick_web/live/vote/vote_capture_live.ex +++ b/lib/flick_web/live/vote/vote_capture_live.ex @@ -13,8 +13,8 @@ defmodule FlickWeb.Vote.VoteCaptureLive do @impl Phoenix.LiveView def mount(params, _session, socket) do - %{"ballot_id" => ballot_id} = params - ballot = RankedVoting.get_ballot!(ballot_id) + %{"url_slug" => url_slug} = params + ballot = RankedVoting.get_ballot_by_url_slug!(url_slug) socket |> verify_ballot_is_published(ballot)