diff --git a/BE/src/common/redis/redis.domain-service.ts b/BE/src/common/redis/redis.domain-service.ts index 39fa2d5..118cb3a 100644 --- a/BE/src/common/redis/redis.domain-service.ts +++ b/BE/src/common/redis/redis.domain-service.ts @@ -72,9 +72,9 @@ export class RedisDomainService { await this.subscriber.subscribe(channel); } - on(callback: (message: string) => void) { - this.subscriber.on('message', (message) => { - callback(message); + on(callback: (channel: string, message: string) => void) { + this.subscriber.on('message', (channel, message) => { + callback(channel, message); }); } diff --git a/BE/src/common/websocket/base-socket.domain-service.ts b/BE/src/common/websocket/base-socket.domain-service.ts index f215824..95ac62e 100644 --- a/BE/src/common/websocket/base-socket.domain-service.ts +++ b/BE/src/common/websocket/base-socket.domain-service.ts @@ -83,7 +83,7 @@ export class BaseSocketDomainService implements OnModuleInit { }, 60000); }; - this.redisDomainService.on((message) => { + this.redisDomainService.on((channel, message) => { const dataList = message.split('^'); this.socketDataHandlers.H0STCNT0(dataList); });