mirror of
https://github.com/wallabag/wallabag.git
synced 2024-12-28 18:40:29 +00:00
parent
fbfeb20062
commit
a07872238b
1 changed files with 6 additions and 6 deletions
|
@ -239,12 +239,12 @@ class EntryRestController extends WallabagRestController
|
|||
$results[$key]['url'] = $url;
|
||||
|
||||
if (false !== $entry) {
|
||||
// entry deleted, dispatch event about it!
|
||||
$this->get('event_dispatcher')->dispatch(EntryDeletedEvent::NAME, new EntryDeletedEvent($entry));
|
||||
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$em->remove($entry);
|
||||
$em->flush();
|
||||
|
||||
// entry deleted, dispatch event about it!
|
||||
$this->get('event_dispatcher')->dispatch(EntryDeletedEvent::NAME, new EntryDeletedEvent($entry));
|
||||
}
|
||||
|
||||
$results[$key]['entry'] = $entry instanceof Entry ? true : false;
|
||||
|
@ -610,13 +610,13 @@ class EntryRestController extends WallabagRestController
|
|||
$response = $this->sendResponse($e);
|
||||
}
|
||||
|
||||
// entry deleted, dispatch event about it!
|
||||
$this->get('event_dispatcher')->dispatch(EntryDeletedEvent::NAME, new EntryDeletedEvent($entry));
|
||||
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$em->remove($entry);
|
||||
$em->flush();
|
||||
|
||||
// entry deleted, dispatch event about it!
|
||||
$this->get('event_dispatcher')->dispatch(EntryDeletedEvent::NAME, new EntryDeletedEvent($entry));
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue