Skip to content

Commit

Permalink
Base access on url_slug.
Browse files Browse the repository at this point in the history
  • Loading branch information
zorn committed Aug 6, 2024
1 parent 69ad584 commit 4cb07b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/flick_web/live/vote/vote_capture_live.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4cb07b1

Please sign in to comment.