-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
40 changed files
with
872 additions
and
498 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/CrowdParlay.Social.Api/v1/Controllers/LookupController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using System.Net.Mime; | ||
using CrowdParlay.Social.Domain.ValueObjects; | ||
using Microsoft.AspNetCore.Mvc; | ||
|
||
namespace CrowdParlay.Social.Api.v1.Controllers; | ||
|
||
[ApiController, ApiRoute("[controller]")] | ||
public class LookupController : ControllerBase | ||
{ | ||
[HttpGet("reactions")] | ||
[Consumes(MediaTypeNames.Application.Json), Produces(MediaTypeNames.Application.Json)] | ||
public IReadOnlySet<string> GetAvailableReactions() => Reaction.AllowedValues; | ||
} |
9 changes: 6 additions & 3 deletions
9
src/CrowdParlay.Social.Application/Abstractions/ICommentsService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
using CrowdParlay.Social.Application.DTOs; | ||
using CrowdParlay.Social.Domain.DTOs; | ||
using CrowdParlay.Social.Domain.ValueObjects; | ||
|
||
namespace CrowdParlay.Social.Application.Abstractions; | ||
|
||
public interface ICommentsService | ||
{ | ||
public Task<CommentDto> GetByIdAsync(Guid id); | ||
public Task<Page<CommentDto>> SearchAsync(Guid? discussionId, Guid? authorId, int offset, int count); | ||
public Task<CommentDto> GetByIdAsync(Guid commentId, Guid? viewerId); | ||
public Task<Page<CommentDto>> SearchAsync(Guid? discussionId, Guid? authorId, Guid? viewerId, int offset, int count); | ||
public Task<CommentDto> CreateAsync(Guid authorId, Guid discussionId, string content); | ||
public Task<Page<CommentDto>> GetRepliesToCommentAsync(Guid parentCommentId, int offset, int count); | ||
public Task<Page<CommentDto>> GetRepliesToCommentAsync(Guid parentCommentId, Guid? viewerId, int offset, int count); | ||
public Task<CommentDto> ReplyToCommentAsync(Guid authorId, Guid parentCommentId, string content); | ||
public Task<CommentDto> AddReactionAsync(Guid authorId, Guid commentId, Reaction reaction); | ||
public Task<CommentDto> RemoveReactionAsync(Guid authorId, Guid commentId, Reaction reaction); | ||
public Task DeleteAsync(Guid id); | ||
} |
8 changes: 5 additions & 3 deletions
8
src/CrowdParlay.Social.Application/Abstractions/IDiscussionsService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
using CrowdParlay.Social.Application.DTOs; | ||
using CrowdParlay.Social.Domain.DTOs; | ||
using CrowdParlay.Social.Domain.ValueObjects; | ||
|
||
namespace CrowdParlay.Social.Application.Abstractions; | ||
|
||
public interface IDiscussionsService | ||
{ | ||
public Task<DiscussionDto> GetByIdAsync(Guid id); | ||
public Task<Page<DiscussionDto>> GetAllAsync(int offset, int count); | ||
public Task<Page<DiscussionDto>> GetByAuthorAsync(Guid authorId, int offset, int count); | ||
public Task<DiscussionDto> GetByIdAsync(Guid discussionId, Guid? viewerId); | ||
public Task<Page<DiscussionDto>> SearchAsync(Guid? authorId, Guid? viewerId, int offset, int count); | ||
public Task<DiscussionDto> CreateAsync(Guid authorId, string title, string description); | ||
public Task<DiscussionDto> AddReactionAsync(Guid authorId, Guid discussionId, Reaction reaction); | ||
public Task<DiscussionDto> RemoveReactionAsync(Guid authorId, Guid discussionId, Reaction reaction); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.