Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/Controller/OCSApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\OCS\OCSBadRequestException;
use OCP\AppFramework\OCSController;
use OCP\IConfig;
use OCP\IRequest;
use OCP\IURLGenerator;
use Psr\Log\InvalidArgumentException;
Expand All @@ -33,6 +34,7 @@ public function __construct(
IRequest $request,
private readonly LoggerInterface $logger,
private readonly AppAPIService $service,
private IConfig $config,
private readonly ExAppService $exAppService,
private readonly IURLGenerator $urlGenerator,
) {
Expand Down Expand Up @@ -113,7 +115,7 @@ public function getEnabledState(): DataResponse {
#[NoCSRFRequired]
public function getNextcloudAbsoluteUrl(string $url): DataResponse {
return new DataResponse([
'absolute_url' => $this->urlGenerator->getAbsoluteURL($url),
'absolute_url' => rtrim($this->config->getSystemValueString('overwrite.cli.url'), '/') . '/' . ltrim($url, '/'),
], Http::STATUS_OK);
}
}
Loading