Skip to content

Commit

Permalink
Fix broken admin panel
Browse files Browse the repository at this point in the history
  • Loading branch information
mjftw committed Oct 17, 2023
1 parent 0939deb commit b8a5e7d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions config/runtime.exs
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ if config_env() == :prod do
# Check `Plug.SSL` for all available options in `force_ssl`.
else
config :tetrex,
admin_panel_username: System.get_env("ADMIN_PANEL_USERNAME", "admin")

config :tetrex,
admin_panel_username: System.get_env("ADMIN_PANEL_USERNAME", "admin"),
admin_panel_password: System.get_env("ADMIN_PANEL_PASSWORD", "password")
end
4 changes: 2 additions & 2 deletions lib/tetrex_web/live/admin_live.ex
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ defmodule TetrexWeb.AdminLive do
socket_current_user_assign_key: :current_user,
socket_users_assign_key: :users

def admin_panel_username, do: Application.fetch_env!(:tetrex, [:admin, :admin_panel_username])
def admin_panel_password, do: Application.fetch_env!(:tetrex, [:admin, :admin_panel_password])
def admin_panel_username, do: Application.fetch_env!(:tetrex, :admin_panel_username)
def admin_panel_password, do: Application.fetch_env!(:tetrex, :admin_panel_password)

@impl true
def mount(_params, %{"user_id" => current_user_id} = _session, socket) do
Expand Down

0 comments on commit b8a5e7d

Please sign in to comment.