mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-04 23:54:08 +01:00
chore: Remove unused methods, minor refactor.
Signed-off-by: Rubén D <nuxsmin@syspass.org>
This commit is contained in:
@@ -30,7 +30,7 @@ use JsonException;
|
||||
use SP\Core\Events\Event;
|
||||
use SP\Core\Events\EventMessage;
|
||||
use SP\Domain\Core\Acl\AclActionsInterface;
|
||||
use SP\Http\JsonResponse;
|
||||
use SP\Http\JsonMessage;
|
||||
use SP\Modules\Web\Controllers\Traits\JsonTrait;
|
||||
|
||||
final class SaveCreateController extends NotificationSaveBase
|
||||
@@ -46,7 +46,7 @@ final class SaveCreateController extends NotificationSaveBase
|
||||
try {
|
||||
if (!$this->acl->checkUserAccess(AclActionsInterface::NOTIFICATION_CREATE)) {
|
||||
return $this->returnJsonResponse(
|
||||
JsonResponse::JSON_ERROR,
|
||||
JsonMessage::JSON_ERROR,
|
||||
__u('You don\'t have permission to do this operation')
|
||||
);
|
||||
}
|
||||
@@ -60,7 +60,7 @@ final class SaveCreateController extends NotificationSaveBase
|
||||
new Event($this, EventMessage::factory()->addDescription(__u('Notification created')))
|
||||
);
|
||||
|
||||
return $this->returnJsonResponse(JsonResponse::JSON_SUCCESS, __u('Notification created'));
|
||||
return $this->returnJsonResponse(JsonMessage::JSON_SUCCESS, __u('Notification created'));
|
||||
} catch (Exception $e) {
|
||||
processException($e);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user