From 4351e7866479feda11d49cf651c256825e2762b3 Mon Sep 17 00:00:00 2001 From: Anna Headley <845363+hackartisan@users.noreply.github.com> Date: Tue, 7 Jan 2025 10:22:18 -0500 Subject: [PATCH] Use Mix.env instead of setting up our own --- config/dev.exs | 3 --- config/prod.exs | 3 --- config/test.exs | 3 --- lib/dpul_collections/application.ex | 2 +- 4 files changed, 1 insertion(+), 10 deletions(-) diff --git a/config/dev.exs b/config/dev.exs index 30ad5440..cc62b4bd 100644 --- a/config/dev.exs +++ b/config/dev.exs @@ -74,9 +74,6 @@ config :dpul_collections, DpulCollectionsWeb.Endpoint, ] ] -# Set environment -config :dpul_collections, :current_env, :dev - config :dpul_collections, :basic_auth_username, "admin" config :dpul_collections, :basic_auth_password, "admin" diff --git a/config/prod.exs b/config/prod.exs index fe4f8a80..0e1d1fb9 100644 --- a/config/prod.exs +++ b/config/prod.exs @@ -8,9 +8,6 @@ import Config config :dpul_collections, DpulCollectionsWeb.Endpoint, cache_static_manifest: "priv/static/cache_manifest.json" -# Set environment -config :dpul_collections, :current_env, :prod - # Enable dev routes - including mailbox preview and the dashboard. config :dpul_collections, dev_routes: true diff --git a/config/test.exs b/config/test.exs index 4a4d04e4..20f73faa 100644 --- a/config/test.exs +++ b/config/test.exs @@ -36,9 +36,6 @@ config :dpul_collections, DpulCollectionsWeb.Endpoint, # In test we don't send emails. config :dpul_collections, DpulCollections.Mailer, adapter: Swoosh.Adapters.Test -# Set environment -config :dpul_collections, :current_env, :test - # Set basic auth config :dpul_collections, :basic_auth_username, "admin" config :dpul_collections, :basic_auth_password, "test" diff --git a/lib/dpul_collections/application.ex b/lib/dpul_collections/application.ex index 015f1eae..24b26786 100644 --- a/lib/dpul_collections/application.ex +++ b/lib/dpul_collections/application.ex @@ -22,7 +22,7 @@ defmodule DpulCollections.Application do # Start to serve requests, typically the last entry DpulCollectionsWeb.Endpoint, DpulCollections.IndexMetricsTracker - ] ++ environment_children(Application.fetch_env!(:dpul_collections, :current_env)) + ] ++ environment_children(Mix.env()) # See https://hexdocs.pm/elixir/Supervisor.html # for other strategies and supported options