add nextcloud shell

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Harivansh Rathi 2026-03-31 21:25:48 +00:00
parent 57f221fb72
commit eea46f28ad
9 changed files with 337 additions and 0 deletions

View 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, '/');
}
}