refactor(core): Rename EventRelay to EventService (no-changelog) (#10110)

This commit is contained in:
Iván Ovejero
2024-07-19 12:55:38 +02:00
committed by GitHub
parent 222a0862bd
commit aba1c64500
36 changed files with 203 additions and 195 deletions

View File

@@ -6,14 +6,14 @@ import { CacheService } from '@/services/cache/cache.service';
import { VariablesRepository } from '@db/repositories/variables.repository';
import { VariableCountLimitReachedError } from '@/errors/variable-count-limit-reached.error';
import { VariableValidationError } from '@/errors/variable-validation.error';
import { EventRelay } from '@/eventbus/event-relay.service';
import { EventService } from '@/eventbus/event.service';
@Service()
export class VariablesService {
constructor(
protected cacheService: CacheService,
protected variablesRepository: VariablesRepository,
private readonly eventRelay: EventRelay,
private readonly eventService: EventService,
) {}
async getAllCached(): Promise<Variables[]> {
@@ -71,7 +71,7 @@ export class VariablesService {
}
this.validateVariable(variable);
this.eventRelay.emit('variable-created', { variableType: variable.type });
this.eventService.emit('variable-created', { variableType: variable.type });
const saveResult = await this.variablesRepository.save(
{
...variable,