Skip to content

Commit

Permalink
IBX-4417: Fixed DomainContentResolver (#48)
Browse files Browse the repository at this point in the history
* IBX-4417: Fixed `DomainContentResolver`

* IBX-4417: Refactored solution
  • Loading branch information
barw4 authored Feb 16, 2023
1 parent c5b618b commit 7e0d05e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/Mutation/UploadFiles.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use GraphQL\Error\UserError;
use Ibexa\AdminUi\UI\Config\Provider\ContentTypeMappings;
use Ibexa\Contracts\Core\Repository\Repository;
use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo;
use Ibexa\Contracts\Core\Repository\Values\Content\Content;
use Ibexa\Core\FieldType;
use Overblog\GraphQLBundle\Definition\Argument;
use Symfony\Component\HttpFoundation\File\UploadedFile;
Expand Down Expand Up @@ -77,7 +77,7 @@ static function ($key) {
* @param $locationId The parent location ID
* @param $languageCode
*/
private function createContent(array $mapping, UploadedFile $file, $locationId, $languageCode): ContentInfo
private function createContent(array $mapping, UploadedFile $file, $locationId, $languageCode): Content
{
$contentService = $this->repository->getContentService();
$locationService = $this->repository->getLocationService();
Expand Down Expand Up @@ -112,7 +112,7 @@ private function createContent(array $mapping, UploadedFile $file, $locationId,
$draft = $contentService->createContent($struct, [$locationService->newLocationCreateStruct($locationId)]);
$content = $contentService->publishVersion($draft->getVersionInfo());

return $content->contentInfo;
return $content;
}
}

Expand Down

0 comments on commit 7e0d05e

Please sign in to comment.