refactor: cleanup mix credo issues

This commit is contained in:
Schuwi
2025-09-20 11:35:04 +02:00
parent 72484c0d08
commit f4ee768c52
9 changed files with 134 additions and 124 deletions

View File

@@ -11,9 +11,7 @@ defmodule ComponentsElixirWeb.StorageLocationsLive do
@impl true
def mount(_params, session, socket) do
# Check authentication
unless Auth.authenticated?(session) do
{:ok, socket |> push_navigate(to: ~p"/login")}
else
if Auth.authenticated?(session) do
storage_locations = list_storage_locations()
{:ok,
@@ -28,6 +26,8 @@ defmodule ComponentsElixirWeb.StorageLocationsLive do
|> assign(:scanned_tags, [])
|> assign(:expanded_locations, MapSet.new())
|> assign(:page_title, "Storage Location Management")}
else
{:ok, socket |> push_navigate(to: ~p"/login")}
end
end