From 57a225e35c5d29047fb283a67c08126b85c073f5 Mon Sep 17 00:00:00 2001 From: Murat Merdoglu Date: Wed, 6 Mar 2024 08:55:45 +0100 Subject: [PATCH] add moveCard handler --- src/socket/socket/socket.gateway.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/socket/socket/socket.gateway.ts b/src/socket/socket/socket.gateway.ts index ebb9de1..39a4397 100644 --- a/src/socket/socket/socket.gateway.ts +++ b/src/socket/socket/socket.gateway.ts @@ -84,4 +84,12 @@ export class SocketGateway client.broadcast.emit('create-card-success', responsePayload); client.emit('create-card-success', responsePayload); } + + @SubscribeMessage('move-card-request') + handleMoveCard(client: any, data: any) { + this.logger.log(`Message received from client id: ${client.id}`); + this.logger.debug(`Payload: ${data}`); + client.broadcast.emit('move-card-success', data); + client.emit('move-card-success', data); + } }