public async Task <IActionResult> VotePie()
    {
        // save vote
        await voteManager.CastVote("pie");

        await hubContext.Clients.All.SendAsync("updateVotes", voteManager.GetCurrentVotes());

        return(Ok());
    }
예제 #2
0
 public Dictionary <string, int> GetCurrentVotes()
 {
     return(voteManager.GetCurrentVotes());
 }