diff options
Diffstat (limited to 'src/Services/DevHive.Services/Interfaces')
| -rw-r--r-- | src/Services/DevHive.Services/Interfaces/IRateService.cs | 14 | ||||
| -rw-r--r-- | src/Services/DevHive.Services/Interfaces/IRatingService.cs | 23 |
2 files changed, 23 insertions, 14 deletions
diff --git a/src/Services/DevHive.Services/Interfaces/IRateService.cs b/src/Services/DevHive.Services/Interfaces/IRateService.cs deleted file mode 100644 index 359ef55..0000000 --- a/src/Services/DevHive.Services/Interfaces/IRateService.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Threading.Tasks; -using DevHive.Data.Models; -using DevHive.Services.Models.Post.Rating; - -namespace DevHive.Services.Interfaces -{ - public interface IRateService - { - Task<ReadPostRatingServiceModel> RatePost(RatePostServiceModel ratePostServiceModel); - - bool HasUserRatedThisPost(User user, Post post); - } -} diff --git a/src/Services/DevHive.Services/Interfaces/IRatingService.cs b/src/Services/DevHive.Services/Interfaces/IRatingService.cs new file mode 100644 index 0000000..b9ddc2c --- /dev/null +++ b/src/Services/DevHive.Services/Interfaces/IRatingService.cs @@ -0,0 +1,23 @@ +using System; +using System.Threading.Tasks; +using DevHive.Data.Models; +using DevHive.Services.Models.Post.Rating; + +namespace DevHive.Services.Interfaces +{ + public interface IRatingService + { + Task<Guid> RatePost(CreateRatingServiceModel createRatingServiceModel); + + Task<ReadRatingServiceModel> GetRatingById(Guid ratingId); + Task<bool> HasUserRatedThisPost(Guid userId, Guid postId); + + Task<ReadRatingServiceModel> UpdateRating(UpdateRatingServiceModel updateRatingServiceModel); + + Task<bool> DeleteRating(Guid ratingId); + + Task<bool> ValidateJwtForCreating(Guid userId, string rawTokenData); + + Task<bool> ValidateJwtForRating(Guid commentId, string rawTokenData); + } +} |
