Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Commit

Permalink
reuse item service instead of using a new instance (#959)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lapsus authored and binal-7span committed May 17, 2019
1 parent 857bb6b commit 803ad9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/Directus/Services/SettingsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ public function findAll(array $params = [])

public function findFile($id,array $params = [])
{
return (new ItemsService($this->container))->findByIds(SchemaManager::COLLECTION_FILES, $id,$params);
return $this->itemsService->findByIds(SchemaManager::COLLECTION_FILES, $id,$params);
}

public function findAllFields(array $params = [])
{
return (new ItemsService($this->container))->findAll(SchemaManager::COLLECTION_FIELDS, array_merge($params, [
return $this->itemsService->findAll(SchemaManager::COLLECTION_FIELDS, array_merge($params, [
'filter' => [
'collection' => $this->collection
]
Expand Down

0 comments on commit 803ad9d

Please sign in to comment.