File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 44
55namespace PhpList \RestBundle \Messaging \Controller ;
66
7+ use Doctrine \ORM \EntityManagerInterface ;
78use OpenApi \Attributes as OA ;
89use PhpList \Core \Domain \Messaging \Model \Message ;
910use PhpList \Core \Domain \Messaging \Service \Manager \ListMessageManager ;
@@ -37,7 +38,8 @@ public function __construct(
3738 ListMessageManager $ listMessageManager ,
3839 ListMessageNormalizer $ listMessageNormalizer ,
3940 SubscriberListNormalizer $ subscriberListNormalizer ,
40- MessageNormalizer $ messageNormalizer
41+ MessageNormalizer $ messageNormalizer ,
42+ private readonly EntityManagerInterface $ entityManager ,
4143 ) {
4244 parent ::__construct ($ authentication , $ validator );
4345 $ this ->listMessageManager = $ listMessageManager ;
@@ -262,6 +264,7 @@ public function associateMessageWithList(
262264 }
263265
264266 $ listMessage = $ this ->listMessageManager ->associateMessageWithList ($ message , $ subscriberList );
267+ $ this ->entityManager ->flush ();
265268
266269 return $ this ->json (
267270 data: $ this ->listMessageNormalizer ->normalize ($ listMessage ),
You can’t perform that action at this time.
0 commit comments