From cfa750aff2518d35be6a9f2d60a672a61328f77d Mon Sep 17 00:00:00 2001 From: flo Date: Wed, 1 Jan 2025 23:45:37 +0100 Subject: [PATCH] api keys change --- .env.example | 6 +----- config/autoload/api.global.php | 21 +------------------ .../src/Factory/RequestServiceFactory.php | 2 +- 3 files changed, 3 insertions(+), 26 deletions(-) diff --git a/.env.example b/.env.example index 892e582..dc4e8de 100644 --- a/.env.example +++ b/.env.example @@ -8,11 +8,7 @@ DB_NAME=template DB_NAME_LOG=log # API Keys -AUTH_API_KEY= -NOTIFICATION_API_KEY= -FILE_API_KEY= -HOMEPAGE_API_KEY= -BEE_API_KEY= +TEMPLATE_API_KEY= # Template Setup INIT_USER_NAME=admin diff --git a/config/autoload/api.global.php b/config/autoload/api.global.php index 35e85c3..f36e8bd 100644 --- a/config/autoload/api.global.php +++ b/config/autoload/api.global.php @@ -3,26 +3,7 @@ return [ 'api' => [ 'keys' => [ - 'template' => $_ENV['HOMEPAGE_API_KEY'], - 'notification' => $_ENV['NOTIFICATION_API_KEY'], - ], - - 'services' => [ - 'template' => [ - 'host' => 'template-backend-nginx', - 'apis' => [ - - ] - ], - 'notification' => [ - 'host' => 'notification-backend-nginx', - 'apis' => [ - 'send-mail' => [ - 'path' => '/api/mail/send', - 'method' => 'POST' - ], - ], - ], + 'template' => $_ENV['TEMPLATE_API_KEY'], ], ], ]; diff --git a/src/Infrastructure/Request/src/Factory/RequestServiceFactory.php b/src/Infrastructure/Request/src/Factory/RequestServiceFactory.php index f1e4396..c28553e 100644 --- a/src/Infrastructure/Request/src/Factory/RequestServiceFactory.php +++ b/src/Infrastructure/Request/src/Factory/RequestServiceFactory.php @@ -18,7 +18,7 @@ class RequestServiceFactory implements FactoryInterface { /** @var ConfigService $configService */ $configService = $container->get(ConfigService::class); - $apiKey = $configService->resolve("api.keys.Template"); + $apiKey = $configService->resolve("api.keys.template"); return new RequestService( $apiKey,