Skip to content

Commit

Permalink
Update lib/lanpartyseating/logic/tournaments_logic.ex
Browse files Browse the repository at this point in the history
Co-authored-by: Nicolas Berbiche <[email protected]>
  • Loading branch information
starcraft66 and berbiche authored Jan 21, 2024
1 parent 8dce89f commit 8d965b9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/lanpartyseating/logic/tournaments_logic.ex
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,10 @@ defmodule Lanpartyseating.TournamentsLogic do
deleted_at: DateTime.truncate(DateTime.utc_now(), :second)
)

with {:ok, _updated} <- Repo.update(tournament) do
{:ok, stations} = StationLogic.get_all_stations()
{:ok, tournaments} = get_upcoming_tournaments()
with {:ok, _updated} <- Repo.update(tournament),
{:ok, stations} <- StationLogic.get_all_stations(),
{:ok, tournaments} <- get_upcoming_tournaments()
do
GenServer.cast(:"expire_tournament_#{id}", :terminate)
GenServer.cast(:"start_tournament_#{id}", :terminate)
Phoenix.PubSub.broadcast(
Expand Down

0 comments on commit 8d965b9

Please sign in to comment.