diff --git a/src/matches/events/MatchMapResetRoundEvent.ts b/src/matches/events/MatchMapResetRoundEvent.ts index 50c54df6..403360f4 100644 --- a/src/matches/events/MatchMapResetRoundEvent.ts +++ b/src/matches/events/MatchMapResetRoundEvent.ts @@ -1,22 +1,9 @@ import MatchEventProcessor from "./abstracts/MatchEventProcessor"; -import { HasuraService } from "../../hasura/hasura.service"; -import { MatchAssistantService } from "../match-assistant/match-assistant.service"; -import { Logger } from "@nestjs/common"; -import { ChatService } from "../../chat/chat.service"; export default class MatchMapResetRoundEvent extends MatchEventProcessor<{ round: string; match_map_id: string; }> { - constructor( - logger: Logger, - hasura: HasuraService, - matchAssistant: MatchAssistantService, - chat: ChatService, - ) { - super(logger, hasura, matchAssistant, chat); - } - public async process() { const statsRound = parseInt(this.data.round); diff --git a/src/matches/events/MatchMapStatusEvent.ts b/src/matches/events/MatchMapStatusEvent.ts index 4665c9ad..108b12c5 100644 --- a/src/matches/events/MatchMapStatusEvent.ts +++ b/src/matches/events/MatchMapStatusEvent.ts @@ -1,25 +1,10 @@ import MatchEventProcessor from "./abstracts/MatchEventProcessor"; import { e_match_map_status_enum } from "../../../generated"; -import { HasuraService } from "../../hasura/hasura.service"; -import { MatchAssistantService } from "../match-assistant/match-assistant.service"; -import { Logger } from "@nestjs/common"; -import { ChatService } from "../../chat/chat.service"; -import { NotificationsService } from "../../notifications/notifications.service"; export default class MatchMapStatusEvent extends MatchEventProcessor<{ status: e_match_map_status_enum; winning_lineup_id?: string; }> { - constructor( - logger: Logger, - hasura: HasuraService, - matchAssistant: MatchAssistantService, - chat: ChatService, - private readonly notifications: NotificationsService, - ) { - super(logger, hasura, matchAssistant, chat); - } - public async process() { const { matches_by_pk: match } = await this.hasura.query({ matches_by_pk: { diff --git a/src/matches/events/abstracts/MatchEventProcessor.ts b/src/matches/events/abstracts/MatchEventProcessor.ts index 28e4aa44..0086ca50 100644 --- a/src/matches/events/abstracts/MatchEventProcessor.ts +++ b/src/matches/events/abstracts/MatchEventProcessor.ts @@ -2,6 +2,7 @@ import { Injectable, Logger, Scope } from "@nestjs/common"; import { HasuraService } from "../../../hasura/hasura.service"; import { MatchAssistantService } from "../../match-assistant/match-assistant.service"; import { ChatService } from "../../../chat/chat.service"; +import { NotificationsService } from "../../../notifications/notifications.service"; @Injectable({ scope: Scope.REQUEST }) export default abstract class MatchEventProcessor { @@ -13,6 +14,7 @@ export default abstract class MatchEventProcessor { protected readonly hasura: HasuraService, protected readonly matchAssistant: MatchAssistantService, protected readonly chat: ChatService, + protected readonly notifications: NotificationsService, ) {} public setData(matchId: string, data: T) {