make provider config simpler
All checks were successful
Build and Publish / build-release (push) Successful in 1m30s

This commit is contained in:
2026-05-04 16:06:19 -05:00
parent 44d89014fd
commit 2137cf4959
3 changed files with 9 additions and 31 deletions

View File

@@ -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