tiny-refactors #27

Merged
jleicher merged 4 commits from tiny-refactors into master 2020-12-17 12:01:12 +01:00
3 changed files with 6 additions and 6 deletions
Showing only changes of commit a4d160c415 - Show all commits

View File

@ -24,10 +24,10 @@ namespace HN.Application
switch (request.Type) switch (request.Type)
{ {
case VoteType.Up: case VoteType.Up:
comment.Upvote(userId); comment.UpvoteBy(userId);
break; break;
case VoteType.Down: case VoteType.Down:
comment.Downvote(userId); comment.DownvoteBy(userId);
break; break;
} }

View File

@ -24,10 +24,10 @@ namespace HN.Application
switch (request.Type) switch (request.Type)
{ {
case VoteType.Up: case VoteType.Up:
link.Upvote(userId); link.UpvoteBy(userId);
break; break;
case VoteType.Down: case VoteType.Down:
link.Downvote(userId); link.DownvoteBy(userId);
break; break;
} }

View File

@ -17,12 +17,12 @@ namespace HN.Domain
_votes = new List<Vote>(); _votes = new List<Vote>();
} }
public void Upvote(Guid userId) public void UpvoteBy(Guid userId)
{ {
UpsertUserVote(userId, VoteType.Up); UpsertUserVote(userId, VoteType.Up);
} }
public void Downvote(Guid userId) public void DownvoteBy(Guid userId)
{ {
UpsertUserVote(userId, VoteType.Down); UpsertUserVote(userId, VoteType.Down);
} }