Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Commit

Permalink
add moveCard handler
Browse files Browse the repository at this point in the history
  • Loading branch information
muratmerdoglu-dp committed Mar 6, 2024
1 parent 98a0720 commit 57a225e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/socket/socket/socket.gateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

0 comments on commit 57a225e

Please sign in to comment.