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

Commit

Permalink
add delete-card feature
Browse files Browse the repository at this point in the history
  • Loading branch information
muratmerdoglu-dp committed Mar 4, 2024
1 parent 029fe7b commit 724f980
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 @@ -63,4 +63,12 @@ export class SocketGateway
client.broadcast.emit('unlock-card-success', data);
client.emit('unlock-card-success', data);
}

@SubscribeMessage('delete-card-request')
handleDeleteCard(client: any, data: any) {
this.logger.log(`Message received from client id: ${client.id}`);
this.logger.debug(`Payload: ${data}`);
client.broadcast.emit('delete-card-success', data);
client.emit('delete-card-success', data);
}
}

0 comments on commit 724f980

Please sign in to comment.