Subscribe the user to the request when they vote on it.

This commit is contained in:
TidusJar 2018-10-03 13:54:19 +01:00
commit a93fdc66ac

View file

@ -85,6 +85,7 @@ namespace Ombi.Core.Engine
return new VoteEngineResult { ErrorMessage = "You have already voted!" }; return new VoteEngineResult { ErrorMessage = "You have already voted!" };
} }
await RemoveCurrentVote(currentVote); await RemoveCurrentVote(currentVote);
await _movieRequestEngine.SubscribeToRequest(requestId, requestType);
await _voteRepository.Add(new Votes await _voteRepository.Add(new Votes
{ {
@ -148,6 +149,8 @@ namespace Ombi.Core.Engine
} }
await RemoveCurrentVote(currentVote); await RemoveCurrentVote(currentVote);
await _movieRequestEngine.UnSubscribeRequest(requestId, requestType);
await _voteRepository.Add(new Votes await _voteRepository.Add(new Votes
{ {
Date = DateTime.UtcNow, Date = DateTime.UtcNow,