From ff91162eb83dcf19402240ae8fa06f70cbf2b9e0 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sat, 30 Jan 2021 11:31:21 +0200 Subject: Separated comment models, controler and service from post's --- src/DevHive.Services/Interfaces/ICommentService.cs | 20 ++++++++++++++++++++ src/DevHive.Services/Interfaces/IPostService.cs | 10 ++-------- 2 files changed, 22 insertions(+), 8 deletions(-) create mode 100644 src/DevHive.Services/Interfaces/ICommentService.cs (limited to 'src/DevHive.Services/Interfaces') diff --git a/src/DevHive.Services/Interfaces/ICommentService.cs b/src/DevHive.Services/Interfaces/ICommentService.cs new file mode 100644 index 0000000..e7409a8 --- /dev/null +++ b/src/DevHive.Services/Interfaces/ICommentService.cs @@ -0,0 +1,20 @@ +using System; +using System.Threading.Tasks; +using DevHive.Services.Models.Comment; + +namespace DevHive.Services.Interfaces +{ + public interface ICommentService + { + Task AddComment(CreateCommentServiceModel createPostServiceModel); + + Task GetCommentById(Guid id); + + Task UpdateComment(UpdateCommentServiceModel updateCommentServiceModel); + + Task DeleteComment(Guid id); + + Task ValidateJwtForCreating(Guid userId, string rawTokenData); + Task ValidateJwtForComment(Guid commentId, string rawTokenData); + } +} diff --git a/src/DevHive.Services/Interfaces/IPostService.cs b/src/DevHive.Services/Interfaces/IPostService.cs index 71b558c..d35acfd 100644 --- a/src/DevHive.Services/Interfaces/IPostService.cs +++ b/src/DevHive.Services/Interfaces/IPostService.cs @@ -1,26 +1,20 @@ using System; using System.Threading.Tasks; -using DevHive.Services.Models.Post.Comment; -using DevHive.Services.Models.Post.Post; +using DevHive.Services.Models.Post; namespace DevHive.Services.Interfaces { - public interface IPostService + public interface IPostService { Task CreatePost(CreatePostServiceModel createPostServiceModel); - Task AddComment(CreateCommentServiceModel createPostServiceModel); Task GetPostById(Guid id); - Task GetCommentById(Guid id); Task UpdatePost(UpdatePostServiceModel updatePostServiceModel); - Task UpdateComment(UpdateCommentServiceModel updateCommentServiceModel); Task DeletePost(Guid id); - Task DeleteComment(Guid id); Task ValidateJwtForCreating(Guid userId, string rawTokenData); Task ValidateJwtForPost(Guid postId, string rawTokenData); - Task ValidateJwtForComment(Guid commentId, string rawTokenData); } } -- cgit v1.2.3