Skip to content

Commit f2a3922

Browse files
fix: fix mercure configuration on Review
1 parent 701898e commit f2a3922

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

api/src/Entity/Review.php

+7-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,13 @@
142142
denormalizationContext: [
143143
AbstractNormalizer::GROUPS => ['Review:write'],
144144
],
145-
collectDenormalizationErrors: true
145+
collectDenormalizationErrors: true,
146+
mercure: [
147+
'topics' => [
148+
'@=iri(object, ' . UrlGeneratorInterface::ABS_URL . ', get_operation(object, "/admin/reviews/{id}{._format}"))',
149+
'@=iri(object, ' . UrlGeneratorInterface::ABS_URL . ', get_operation(object, "/books/{bookId}/reviews/{id}{._format}"))',
150+
],
151+
]
146152
)]
147153
#[ORM\Entity(repositoryClass: ReviewRepository::class)]
148154
#[ORM\UniqueConstraint(fields: ['user', 'book'])]

0 commit comments

Comments
 (0)