mirror of
https://github.com/harivansh-afk/betterNAS.git
synced 2026-04-15 18:01:26 +00:00
add nextcloud shell
Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
parent
57f221fb72
commit
eea46f28ad
9 changed files with 337 additions and 0 deletions
31
apps/ainas-controlplane/lib/Service/ControlPlaneConfig.php
Normal file
31
apps/ainas-controlplane/lib/Service/ControlPlaneConfig.php
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<?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