Skip to content

Commit f8f43e3

Browse files
committed
4260: Fixed issues with colibo feed
1 parent a130ffa commit f8f43e3

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file.
44

55
## [Unreleased]
66

7+
- [#240](https://github.com/os2display/display-api-service/pull/240)
8+
- Fixed issues with Colibo feed type.
79
- [#226](https://github.com/os2display/display-api-service/pull/226)
810
- Added Colibo feed type.
911

src/Feed/ColiboFeedType.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use App\Entity\Tenant\FeedSource;
99
use App\Feed\OutputModel\ConfigOption;
1010
use App\Feed\SourceType\Colibo\ApiClient;
11+
use App\Feed\SourceType\Colibo\SecretsDTO;
1112
use App\Service\FeedService;
1213
use FeedIo\Feed\Item;
1314
use FeedIo\Feed\Node\Category;
@@ -65,14 +66,15 @@ public function getAdminFormOptions(FeedSource $feedSource): array
6566
public function getData(Feed $feed): array
6667
{
6768
$configuration = $feed->getConfiguration();
68-
$secrets = $feed->getFeedSource()?->getSecrets() ?? [];
69+
70+
$secrets = new SecretsDTO($feed->getFeedSource());
6971

7072
$result = [
7173
'title' => 'Intranet',
7274
'entries' => [],
7375
];
7476

75-
$baseUri = $secrets['api_base_uri'];
77+
$baseUri = $secrets->apiBaseUri;
7678
$recipients = $configuration['recipients'] ?? [];
7779
$publishers = $configuration['publishers'] ?? [];
7880
$pageSize = isset($configuration['page_size']) ? (int) $configuration['page_size'] : 10;

src/Feed/SourceType/Colibo/ApiClient.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public function getFeedEntriesNews(FeedSource $feedSource, array $recipients = [
8484
*
8585
* @return array
8686
*/
87-
public function getSearchGroups(FeedSource $feedSource, string $type = 'WorkGroup'): array
87+
public function getSearchGroups(FeedSource $feedSource, string $type = 'Department'): array
8888
{
8989
try {
9090
$responseData = $this->getSearchGroupsPage($feedSource, $type)->toArray();

0 commit comments

Comments
 (0)