diff --git a/apps/fz_http/lib/fz_http_web/live/device_live/admin/show_live.ex b/apps/fz_http/lib/fz_http_web/live/device_live/admin/show_live.ex index 5042458b8..a8e9851e6 100644 --- a/apps/fz_http/lib/fz_http_web/live/device_live/admin/show_live.ex +++ b/apps/fz_http/lib/fz_http_web/live/device_live/admin/show_live.ex @@ -32,8 +32,6 @@ defmodule FzHttpWeb.DeviceLive.Admin.Show do case Devices.delete_device(device) do {:ok, _deleted_device} -> - {:ok, _deleted_pubkey} = @events_module.delete_device(device) - {:noreply, socket |> dispatch_delete_device(device) diff --git a/apps/fz_http/lib/fz_http_web/live/device_live/unprivileged/show_live.ex b/apps/fz_http/lib/fz_http_web/live/device_live/unprivileged/show_live.ex index 0f9f9cacf..ba4e93ba4 100644 --- a/apps/fz_http/lib/fz_http_web/live/device_live/unprivileged/show_live.ex +++ b/apps/fz_http/lib/fz_http_web/live/device_live/unprivileged/show_live.ex @@ -25,8 +25,6 @@ defmodule FzHttpWeb.DeviceLive.Unprivileged.Show do case delete_device(device, socket) do {:ok, _deleted_device} -> - {:ok, _deleted_pubkey} = @events_module.delete_device(device) - {:noreply, socket |> dispatch_delete_device(device) diff --git a/apps/fz_http/lib/fz_http_web/mock_events.ex b/apps/fz_http/lib/fz_http_web/mock_events.ex index 53fdd01b3..9a96a83d4 100644 --- a/apps/fz_http/lib/fz_http_web/mock_events.ex +++ b/apps/fz_http/lib/fz_http_web/mock_events.ex @@ -7,8 +7,8 @@ defmodule FzHttpWeb.MockEvents do inside FzHttp and use that for the tests. """ - def delete_device(device) do - {:ok, device} + def delete_device(_device) do + maybe_mock_error() end def create_user(_user) do diff --git a/apps/fz_http/test/fz_http/events_test.exs b/apps/fz_http/test/fz_http/events_test.exs index adc8c79c6..e15823860 100644 --- a/apps/fz_http/test/fz_http/events_test.exs +++ b/apps/fz_http/test/fz_http/events_test.exs @@ -45,7 +45,7 @@ defmodule FzHttp.EventsTest do test "removes device from vpn and wall state", %{device: device} do :ok = Events.update_device(device) pubkey = device.public_key - assert {:ok, ^pubkey} = Events.delete_device(device) + assert :ok = Events.delete_device(device) assert :sys.get_state(Events.vpn_pid()) == %{}