Skip to content

Commit

Permalink
Allow noi-communityapp as publisher
Browse files Browse the repository at this point in the history
  • Loading branch information
gappc committed Apr 23, 2024
1 parent 5c15438 commit 4ab3cc8
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions databrowser/src/domain/publisher/usePublisher.ts
Expand Up @@ -24,16 +24,11 @@ const select = (
): TourismPublisher[] => {
// Unwrap data from pagination
const unwrappedData = unwrapData<OdhPublisher[]>(data);
return (
unwrappedData
.filter((publisher) => publisher.PushConfig?.length > 0)
// At the moment it should not be possible to send push notifications to the noi community app
// This exception is hardcoded here, but it should be handled in a more generic way
.filter((publisher) => publisher.Id !== 'noi-communityapp')
.map<TourismPublisher>((publisher) => ({
id: publisher.Id,
key: publisher.Key,
name: publisher.Name,
}))
);
return unwrappedData
.filter((publisher) => publisher.PushConfig?.length > 0)
.map<TourismPublisher>((publisher) => ({
id: publisher.Id,
key: publisher.Key,
name: publisher.Name,
}));
};

0 comments on commit 4ab3cc8

Please sign in to comment.