refactor message broker
This commit is contained in:
parent
5c5e6be23d
commit
021655c90b
|
@ -26,7 +26,7 @@ export class CreateConfigurationUseCase {
|
|||
try {
|
||||
const configuration = await this._repository.create(entity);
|
||||
this._messager.publish(
|
||||
'create',
|
||||
'configuration.create',
|
||||
JSON.stringify(
|
||||
this._mapper.map(
|
||||
configuration,
|
||||
|
|
|
@ -19,7 +19,7 @@ export class DeleteConfigurationUseCase {
|
|||
try {
|
||||
const configuration = await this._repository.delete(command.uuid);
|
||||
this._messager.publish(
|
||||
'delete',
|
||||
'configuration.delete',
|
||||
JSON.stringify(
|
||||
this._mapper.map(
|
||||
configuration,
|
||||
|
|
|
@ -20,7 +20,7 @@ export class PropagateConfigurationsUseCase {
|
|||
try {
|
||||
const configurations = await this._repository.findAll(1, 999999);
|
||||
this._messager.publish(
|
||||
'propagate',
|
||||
'configuration.propagate',
|
||||
JSON.stringify(
|
||||
configurations.data.map((configuration) =>
|
||||
this._mapper.map(
|
||||
|
|
|
@ -29,7 +29,7 @@ export class UpdateConfigurationUseCase {
|
|||
entity,
|
||||
);
|
||||
this._messager.publish(
|
||||
'update',
|
||||
'configuration.update',
|
||||
JSON.stringify(
|
||||
this._mapper.map(
|
||||
configuration,
|
||||
|
|
Loading…
Reference in New Issue