aboutsummaryrefslogtreecommitdiff
path: root/src/DevHive.Services/Interfaces
diff options
context:
space:
mode:
authortranstrike <transtrike@gmail.com>2021-01-31 12:58:44 +0200
committertranstrike <transtrike@gmail.com>2021-01-31 12:58:44 +0200
commit979a86a14cd658b5346279901ac8bca667c373d3 (patch)
tree9791cf02c0838a4d6392e3651f93eeed283acb57 /src/DevHive.Services/Interfaces
parent9d5f4628a3a75871b47ac6a9f9c0419748d9dfb8 (diff)
parentb8743cfdd0515e4d07ea5c926be1d9ade5340a91 (diff)
downloadDevHive-979a86a14cd658b5346279901ac8bca667c373d3.tar
DevHive-979a86a14cd658b5346279901ac8bca667c373d3.tar.gz
DevHive-979a86a14cd658b5346279901ac8bca667c373d3.zip
Username added to JWT; Promotion to Admin fixed
Diffstat (limited to 'src/DevHive.Services/Interfaces')
-rw-r--r--src/DevHive.Services/Interfaces/ICommentService.cs20
-rw-r--r--src/DevHive.Services/Interfaces/IFeedService.cs1
-rw-r--r--src/DevHive.Services/Interfaces/IPostService.cs10
3 files changed, 23 insertions, 8 deletions
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<Guid> AddComment(CreateCommentServiceModel createPostServiceModel);
+
+ Task<ReadCommentServiceModel> GetCommentById(Guid id);
+
+ Task<Guid> UpdateComment(UpdateCommentServiceModel updateCommentServiceModel);
+
+ Task<bool> DeleteComment(Guid id);
+
+ Task<bool> ValidateJwtForCreating(Guid userId, string rawTokenData);
+ Task<bool> ValidateJwtForComment(Guid commentId, string rawTokenData);
+ }
+}
diff --git a/src/DevHive.Services/Interfaces/IFeedService.cs b/src/DevHive.Services/Interfaces/IFeedService.cs
index 1edba5a..b507b3b 100644
--- a/src/DevHive.Services/Interfaces/IFeedService.cs
+++ b/src/DevHive.Services/Interfaces/IFeedService.cs
@@ -6,5 +6,6 @@ namespace DevHive.Services.Interfaces
public interface IFeedService
{
Task<ReadPageServiceModel> GetPage(GetPageServiceModel getPageServiceModel);
+ Task<ReadPageServiceModel> GetUserPage(GetPageServiceModel model);
}
}
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<Guid> CreatePost(CreatePostServiceModel createPostServiceModel);
- Task<Guid> AddComment(CreateCommentServiceModel createPostServiceModel);
Task<ReadPostServiceModel> GetPostById(Guid id);
- Task<ReadCommentServiceModel> GetCommentById(Guid id);
Task<Guid> UpdatePost(UpdatePostServiceModel updatePostServiceModel);
- Task<Guid> UpdateComment(UpdateCommentServiceModel updateCommentServiceModel);
Task<bool> DeletePost(Guid id);
- Task<bool> DeleteComment(Guid id);
Task<bool> ValidateJwtForCreating(Guid userId, string rawTokenData);
Task<bool> ValidateJwtForPost(Guid postId, string rawTokenData);
- Task<bool> ValidateJwtForComment(Guid commentId, string rawTokenData);
}
}