rename (Up/Down)vote

This commit is contained in:
Julien Leicher 2020-12-15 13:58:27 +01:00
parent f9c6b23e5c
commit a4d160c415
No known key found for this signature in database
GPG Key ID: F2A187E5D2F626A9
3 changed files with 6 additions and 6 deletions

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);
} }