make provider config simpler
All checks were successful
Build and Publish / build-release (push) Successful in 1m30s
All checks were successful
Build and Publish / build-release (push) Successful in 1m30s
This commit is contained in:
@@ -5,12 +5,10 @@ defmodule PolicyService.Application do
|
||||
|
||||
use Application
|
||||
|
||||
defp get_zitadel_config(key) do
|
||||
Application.get_env(:policy_service, :zitadel)[key]
|
||||
end
|
||||
|
||||
@impl true
|
||||
def start(_type, _args) do
|
||||
zitadel_config = Application.get_env(:policy_service, :zitadel, [])
|
||||
|
||||
children = [
|
||||
PolicyService.CommandedApp,
|
||||
PolicyService.Handlers.QuoteRequestHandler,
|
||||
@@ -25,7 +23,7 @@ defmodule PolicyService.Application do
|
||||
{Phoenix.PubSub, name: PolicyService.PubSub, pool_size: 1},
|
||||
{Oidcc.ProviderConfiguration.Worker,
|
||||
%{
|
||||
issuer: get_zitadel_config(:issuer),
|
||||
issuer: Keyword.get(zitadel_config, :issuer),
|
||||
name: PolicyService.ZitadelProvider
|
||||
}},
|
||||
PolicyServiceWeb.Endpoint
|
||||
|
||||
Reference in New Issue
Block a user