diff --git a/lib/Service/ObjectService.php b/lib/Service/ObjectService.php index bc626fb2..e0befbbf 100644 --- a/lib/Service/ObjectService.php +++ b/lib/Service/ObjectService.php @@ -12,6 +12,7 @@ use OCP\App\IAppManager; use OCP\AppFramework\Db\DoesNotExistException; use OCP\AppFramework\Db\MultipleObjectsReturnedException; +use OCP\IURLGenerator; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; use Symfony\Component\Uid\Uuid; @@ -34,6 +35,8 @@ class ObjectService /** @var string $appName The name of the app */ private string $appName; + private ValidationService $validationService; + /** * Constructor for ObjectService. * @@ -59,8 +62,11 @@ public function __construct( private ContainerInterface $container, private readonly IAppManager $appManager, private readonly IAppConfig $config, + IURLGenerator $urlGenerator, ) { $this->appName = 'opencatalogi'; + + $this->validationService = new ValidationService(objectService: $this, urlGenerator: $urlGenerator); } /**