feat(*.php, *.psql): deduplicate API code + performance improvements
This commit is contained in:
parent
92d84e7377
commit
4e2205e0f9
19 changed files with 449 additions and 604 deletions
|
@ -15,17 +15,9 @@ class ContactHandler extends BaseHandler
|
|||
|
||||
public function __construct(?Client $httpClient = null)
|
||||
{
|
||||
parent::__construct();
|
||||
$this->httpClient = $httpClient ?? new Client();
|
||||
$this->loadEnvironment();
|
||||
}
|
||||
|
||||
private function loadEnvironment(): void
|
||||
{
|
||||
$this->postgrestUrl = $_ENV["POSTGREST_URL"] ?? getenv("POSTGREST_URL");
|
||||
$this->postgrestApiKey =
|
||||
$_ENV["POSTGREST_API_KEY"] ?? getenv("POSTGREST_API_KEY");
|
||||
$this->forwardEmailApiKey =
|
||||
$_ENV["FORWARDEMAIL_API_KEY"] ?? getenv("FORWARDEMAIL_API_KEY");
|
||||
$this->forwardEmailApiKey = $_ENV["FORWARDEMAIL_API_KEY"] ?? getenv("FORWARDEMAIL_API_KEY");
|
||||
}
|
||||
|
||||
public function handleRequest(): void
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue