Merge branch 'refactorMessager' into 'main'
refactor message broker See merge request v3/service/configuration!14
This commit is contained in:
		
						commit
						62e1ea4b1e
					
				| 
						 | 
					@ -26,7 +26,7 @@ export class CreateConfigurationUseCase {
 | 
				
			||||||
    try {
 | 
					    try {
 | 
				
			||||||
      const configuration = await this._repository.create(entity);
 | 
					      const configuration = await this._repository.create(entity);
 | 
				
			||||||
      this._messager.publish(
 | 
					      this._messager.publish(
 | 
				
			||||||
        'create',
 | 
					        'configuration.create',
 | 
				
			||||||
        JSON.stringify(
 | 
					        JSON.stringify(
 | 
				
			||||||
          this._mapper.map(
 | 
					          this._mapper.map(
 | 
				
			||||||
            configuration,
 | 
					            configuration,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -19,7 +19,7 @@ export class DeleteConfigurationUseCase {
 | 
				
			||||||
    try {
 | 
					    try {
 | 
				
			||||||
      const configuration = await this._repository.delete(command.uuid);
 | 
					      const configuration = await this._repository.delete(command.uuid);
 | 
				
			||||||
      this._messager.publish(
 | 
					      this._messager.publish(
 | 
				
			||||||
        'delete',
 | 
					        'configuration.delete',
 | 
				
			||||||
        JSON.stringify(
 | 
					        JSON.stringify(
 | 
				
			||||||
          this._mapper.map(
 | 
					          this._mapper.map(
 | 
				
			||||||
            configuration,
 | 
					            configuration,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -20,7 +20,7 @@ export class PropagateConfigurationsUseCase {
 | 
				
			||||||
    try {
 | 
					    try {
 | 
				
			||||||
      const configurations = await this._repository.findAll(1, 999999);
 | 
					      const configurations = await this._repository.findAll(1, 999999);
 | 
				
			||||||
      this._messager.publish(
 | 
					      this._messager.publish(
 | 
				
			||||||
        'propagate',
 | 
					        'configuration.propagate',
 | 
				
			||||||
        JSON.stringify(
 | 
					        JSON.stringify(
 | 
				
			||||||
          configurations.data.map((configuration) =>
 | 
					          configurations.data.map((configuration) =>
 | 
				
			||||||
            this._mapper.map(
 | 
					            this._mapper.map(
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -29,7 +29,7 @@ export class UpdateConfigurationUseCase {
 | 
				
			||||||
        entity,
 | 
					        entity,
 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
      this._messager.publish(
 | 
					      this._messager.publish(
 | 
				
			||||||
        'update',
 | 
					        'configuration.update',
 | 
				
			||||||
        JSON.stringify(
 | 
					        JSON.stringify(
 | 
				
			||||||
          this._mapper.map(
 | 
					          this._mapper.map(
 | 
				
			||||||
            configuration,
 | 
					            configuration,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue