mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-03 07:04:07 +01:00
chore: Refactor EventDispatcher and observer pattern
Signed-off-by: Rubén D <nuxsmin@syspass.org>
This commit is contained in:
@@ -67,13 +67,13 @@ final class SaveCreateFromAccountController extends PublicLinkSaveBase
|
||||
|
||||
$this->publicLinkService->create($publicLinkData);
|
||||
|
||||
$this->eventDispatcher->notifyEvent('create.publicLink.account', new Event($this));
|
||||
$this->eventDispatcher->notify('create.publicLink.account', new Event($this));
|
||||
|
||||
return $this->returnJsonResponse(JsonResponse::JSON_SUCCESS, __u('Link created'));
|
||||
} catch (Exception $e) {
|
||||
processException($e);
|
||||
|
||||
$this->eventDispatcher->notifyEvent('exception', new Event($e));
|
||||
$this->eventDispatcher->notify('exception', new Event($e));
|
||||
|
||||
return $this->returnJsonResponseException($e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user