Skip to content

Commit 92b8343

Browse files
committed
Rename value to vote
1 parent a3fa05d commit 92b8343

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

backend/src/pokers/pokers.gateway.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export class PokersGateway implements OnGatewayInit {
110110

111111
const vote = this.pokersService.getVote( client, message.poker );
112112
if ( vote ) {
113-
client.emit( "myVote", { currentValue: vote.currentValue, initialValue: vote.initialValue } );
113+
client.emit( "myVote", { currentVote: vote.currentValue, initialVote: vote.initialValue } );
114114
}
115115

116116
this.send( message.poker, { members: true, votes: true } );
@@ -128,10 +128,11 @@ export class PokersGateway implements OnGatewayInit {
128128
this.pokersService.castVote( client, message.poker, message.vote );
129129

130130
// Send this vote to all sockets for the current user.
131+
const vote = this.pokersService.getVote( client, message.poker );
131132
const socketIds = this.pokersService.getUserSockets( this.pokersService.getUserId( client ) );
132-
const vote = this.pokersService.getVote( client, message.poker );
133+
133134
for ( const socketId of socketIds ) {
134-
this.server.sockets[ socketId ].emit( "myVote", { currentValue: vote.currentValue, initialValue: vote.initialValue } );
135+
this.server.sockets[ socketId ].emit( "myVote", { currentVote: vote.currentValue, initialVote: vote.initialValue } );
135136
}
136137

137138
this.send( message.poker, { votes: true } );

frontend/src/components/PokerChoices.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ export default {
6262
}
6363
},
6464
myVote( msg ) {
65-
this.setVote( msg.currentValue );
66-
this.myInitialVote = msg.initialValue;
65+
this.setVote( msg.currentVote );
66+
this.myInitialVote = msg.initialVote;
6767
},
6868
},
6969
};

0 commit comments

Comments
 (0)