From 021655c90b1fc1089ea038eae72df550c9d51d5c Mon Sep 17 00:00:00 2001 From: sbriat Date: Thu, 16 Mar 2023 10:53:48 +0100 Subject: [PATCH] refactor message broker --- .../domain/usecases/create-configuration.usecase.ts | 2 +- .../domain/usecases/delete-configuration.usecase.ts | 2 +- .../domain/usecases/propagate-configurations.usecase.ts | 2 +- .../domain/usecases/update-configuration.usecase.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/configuration/domain/usecases/create-configuration.usecase.ts b/src/modules/configuration/domain/usecases/create-configuration.usecase.ts index 9db14e6..7b54238 100644 --- a/src/modules/configuration/domain/usecases/create-configuration.usecase.ts +++ b/src/modules/configuration/domain/usecases/create-configuration.usecase.ts @@ -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, diff --git a/src/modules/configuration/domain/usecases/delete-configuration.usecase.ts b/src/modules/configuration/domain/usecases/delete-configuration.usecase.ts index 6291a4f..f9f4b45 100644 --- a/src/modules/configuration/domain/usecases/delete-configuration.usecase.ts +++ b/src/modules/configuration/domain/usecases/delete-configuration.usecase.ts @@ -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, diff --git a/src/modules/configuration/domain/usecases/propagate-configurations.usecase.ts b/src/modules/configuration/domain/usecases/propagate-configurations.usecase.ts index 6a5e210..d313e54 100644 --- a/src/modules/configuration/domain/usecases/propagate-configurations.usecase.ts +++ b/src/modules/configuration/domain/usecases/propagate-configurations.usecase.ts @@ -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( diff --git a/src/modules/configuration/domain/usecases/update-configuration.usecase.ts b/src/modules/configuration/domain/usecases/update-configuration.usecase.ts index e3a27c2..dfa171d 100644 --- a/src/modules/configuration/domain/usecases/update-configuration.usecase.ts +++ b/src/modules/configuration/domain/usecases/update-configuration.usecase.ts @@ -29,7 +29,7 @@ export class UpdateConfigurationUseCase { entity, ); this._messager.publish( - 'update', + 'configuration.update', JSON.stringify( this._mapper.map( configuration,