aboutsummaryrefslogtreecommitdiff
path: root/src/Services/DevHive.Services/Interfaces/IRatingService.cs
blob: b9ddc2cbdedf140c6f0e705690c555a37902bf2e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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);
	}
}