Skip to content

Commit

Permalink
fix: avoiding Application.get_env in the module body
Browse files Browse the repository at this point in the history
  • Loading branch information
ali1ariel committed Dec 5, 2024
1 parent a22ebb2 commit eddb751
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
6 changes: 0 additions & 6 deletions config/runtime.exs
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,6 @@ if config_env() == :prod do
],
secret_key_base: secret_key_base

config :digistab_store,
bucket: System.get_env("AWS_BUCKET_NAME"),
region: System.get_env("AWS_REGION"),
access_key_id: System.get_env("AWS_ACCESS_KEY_ID"),
secret_access_key: System.get_env("AWS_SECRET_ACCESS_KEY")

# ## SSL Support
#
# To get SSL working, you will need to add the `https` key
Expand Down
8 changes: 4 additions & 4 deletions lib/digistab_store_web/live/products/form_component.ex
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ defmodule DigistabStoreWeb.ProductLive.FormComponent do
alias DigistabStore.Store

@config %{
bucket: Application.get_env(:digistab_store, :bucket),
region: Application.get_env(:digistab_store, :region),
access_key_id: Application.get_env(:digistab_store, :access_key_id),
secret_access_key: Application.get_env(:digistab_store, :secret_access_key)
bucket: System.get_env("AWS_BUCKET_NAME"),
region: System.get_env("AWS_REGION"),
access_key_id: System.get_env("AWS_ACCESS_KEY_ID"),
secret_access_key: System.get_env("AWS_SECRET_ACCESS_KEY")
}

@impl true
Expand Down

0 comments on commit eddb751

Please sign in to comment.