Skip to content

Commit

Permalink
Allow setting federationProxies for an Endpoint in fromSchema function
Browse files Browse the repository at this point in the history
  • Loading branch information
WilcoLouwerse committed Jun 14, 2024
1 parent d61dda9 commit a91c34f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions api/src/Entity/Endpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,15 @@ public function fromSchema(array $schema, array $default = [])
if (array_key_exists('loggingConfig', $schema) === true) {
$this->setLoggingConfig($schema['loggingConfig']);
}
if (array_key_exists('federationProxies', $schema) === true) {
$this->federationProxies->clear();
foreach ($schema['federationProxies'] as $federationProxy) {
if ($federationProxy instanceof Gateway === false) {
continue;
}
$this->addFederationProxy($federationProxy);
}
}

/*@depricated kept here for lagacy */
$this->setMethod(array_key_exists('method', $schema) ? $schema['method'] : 'GET');
Expand Down

0 comments on commit a91c34f

Please sign in to comment.