Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vtm9 committed Dec 3, 2023
1 parent cee15bf commit 5d25e4a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion services/app/apps/codebattle/lib/codebattle/game/engine.ex
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,11 @@ defmodule Codebattle.Game.Engine do
Game
|> Repo.insert_all(to_insert, returning: true)
|> then(fn {_count, games} -> games end)
|> Enum.map(fn game ->
|> Enum.zip(games_params)
|> Enum.map(fn {game, params} ->
game = fill_virtual_fields(game)
game = mark_as_live(game)
game = Map.put(game, :task, params.task)
{:ok, _} = Game.GlobalSupervisor.start_game(game)
:ok = maybe_fire_playing_game_side_effects(game)
game
Expand Down

0 comments on commit 5d25e4a

Please sign in to comment.