mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-06 16:36:59 +01:00
* [ADD] User groups can now be managed thorugh API. Related #1054. Thanks to @pierrehenrymuller for the feedback
* [ADD] Added missing API help for some actions * [MOD] Updated translations * [MOD] UI tweaks Signed-off-by: nuxsmin <nuxsmin@syspass.org>
This commit is contained in:
@@ -61,8 +61,8 @@ final class ClientController extends ControllerBase
|
||||
$this->eventDispatcher->notifyEvent('show.client',
|
||||
new Event($this, EventMessage::factory()
|
||||
->addDescription(__u('Cliente visualizado'))
|
||||
->addDetail(__u('Cliente'), $clientData->getName())
|
||||
->addDetail(__u('ID'), $id))
|
||||
->addDetail(__u('Nombre'), $clientData->getName())
|
||||
->addDetail('ID', $id))
|
||||
);
|
||||
|
||||
$this->returnResponse(ApiResponse::makeSuccess($clientData, $id));
|
||||
@@ -86,16 +86,16 @@ final class ClientController extends ControllerBase
|
||||
$clientData->setDescription($this->apiService->getParamString('description'));
|
||||
$clientData->setIsGlobal($this->apiService->getParamInt('global'));
|
||||
|
||||
$clientId = $this->clientService->create($clientData);
|
||||
$id = $this->clientService->create($clientData);
|
||||
|
||||
$this->eventDispatcher->notifyEvent('create.client',
|
||||
new Event($this, EventMessage::factory()
|
||||
->addDescription(__u('Cliente creado'))
|
||||
->addDetail(__u('Cliente'), $clientData->getName())
|
||||
->addDetail(__u('ID'), $clientId))
|
||||
->addDetail(__u('Nombre'), $clientData->getName())
|
||||
->addDetail('ID', $id))
|
||||
);
|
||||
|
||||
$this->returnResponse(ApiResponse::makeSuccess($clientData, $clientId, __('Cliente creado')));
|
||||
$this->returnResponse(ApiResponse::makeSuccess($clientData, $id, __('Cliente creado')));
|
||||
} catch (\Exception $e) {
|
||||
processException($e);
|
||||
|
||||
@@ -122,8 +122,8 @@ final class ClientController extends ControllerBase
|
||||
$this->eventDispatcher->notifyEvent('edit.client',
|
||||
new Event($this, EventMessage::factory()
|
||||
->addDescription(__u('Cliente actualizado'))
|
||||
->addDetail(__u('Cliente'), $clientData->getName())
|
||||
->addDetail(__u('ID'), $clientData->getId()))
|
||||
->addDetail(__u('Nombre'), $clientData->getName())
|
||||
->addDetail('ID', $clientData->getId()))
|
||||
);
|
||||
|
||||
$this->returnResponse(ApiResponse::makeSuccess($clientData, $clientData->getId(), __('Cliente actualizado')));
|
||||
@@ -148,11 +148,11 @@ final class ClientController extends ControllerBase
|
||||
|
||||
$this->clientService->delete($id);
|
||||
|
||||
$this->eventDispatcher->notifyEvent('edit.client',
|
||||
$this->eventDispatcher->notifyEvent('delete.client',
|
||||
new Event($this, EventMessage::factory()
|
||||
->addDescription(__u('Cliente eliminado'))
|
||||
->addDetail(__u('Cliente'), $clientData->getName())
|
||||
->addDetail(__u('ID'), $id))
|
||||
->addDetail(__u('Nombre'), $clientData->getName())
|
||||
->addDetail('ID', $id))
|
||||
);
|
||||
|
||||
$this->returnResponse(ApiResponse::makeSuccess($clientData, $id, __('Cliente eliminado')));
|
||||
@@ -186,6 +186,8 @@ final class ClientController extends ControllerBase
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws \DI\DependencyException
|
||||
* @throws \DI\NotFoundException
|
||||
* @throws \SP\Core\Exceptions\InvalidClassException
|
||||
*/
|
||||
protected function initialize()
|
||||
|
||||
Reference in New Issue
Block a user