mirror of
https://github.com/harivansh-afk/betterNAS.git
synced 2026-04-16 21:03:42 +00:00
rename2
This commit is contained in:
parent
12c53f3515
commit
dc7969e579
37 changed files with 177 additions and 177 deletions
|
|
@ -1,31 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace OCA\AinasControlplane\Service;
|
||||
|
||||
use OCA\AinasControlplane\AppInfo\Application;
|
||||
use OCP\IAppConfig;
|
||||
|
||||
class ControlPlaneConfig {
|
||||
public function __construct(
|
||||
private readonly IAppConfig $appConfig,
|
||||
) {
|
||||
}
|
||||
|
||||
public function getBaseUrl(): string {
|
||||
$environmentUrl = getenv('AINAS_CONTROL_PLANE_URL');
|
||||
if (is_string($environmentUrl) && $environmentUrl !== '') {
|
||||
return rtrim($environmentUrl, '/');
|
||||
}
|
||||
|
||||
$configuredUrl = $this->appConfig->getValueString(
|
||||
Application::APP_ID,
|
||||
'control_plane_url',
|
||||
'http://control-plane:3000',
|
||||
);
|
||||
|
||||
return rtrim($configuredUrl, '/');
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue