Skip to content

Commit

Permalink
Move Logger.debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Rados13 committed May 29, 2024
1 parent d0de790 commit 089e1bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/fishjam_web/controllers/peer_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ defmodule FishjamWeb.PeerController do
]

def create(conn, %{"room_id" => room_id} = params) do
Logger.debug("Successfully added peer to room: #{room_id}")

# the room may crash between fetching its
# pid and adding a new peer to it
# in such a case, the controller will fail
Expand All @@ -77,6 +75,8 @@ defmodule FishjamWeb.PeerController do
{:ok, peer_type} <- Peer.parse_type(peer_type_string),
{:ok, _room_pid} <- RoomService.find_room(room_id),
{:ok, peer} <- Room.add_peer(room_id, peer_type, peer_options) do
Logger.debug("Successfully added peer to room: #{room_id}")

assigns = [
peer: peer,
token: PeerToken.generate(%{peer_id: peer.id, room_id: room_id}),
Expand Down

0 comments on commit 089e1bb

Please sign in to comment.