feat: add feedback comments activity notifications

This commit is contained in:
2026-04-30 13:24:23 -04:00
parent 4873f39192
commit 1263e28c00
26 changed files with 2255 additions and 18 deletions

View File

@@ -3,6 +3,7 @@ using Microsoft.EntityFrameworkCore;
using Socialize.Api.Data;
using Socialize.Api.Infrastructure.Security;
using Socialize.Api.Modules.Feedback.Contracts;
using Socialize.Api.Modules.Feedback.Data;
namespace Socialize.Api.Modules.Feedback.Handlers;
@@ -20,12 +21,12 @@ public class GetMyFeedbackHandler(AppDbContext dbContext)
Guid id = Route<Guid>("id");
Guid reporterUserId = User.GetUserId();
FeedbackReportDto? report = await dbContext.FeedbackReports
FeedbackReport? report = await dbContext.FeedbackReports
.Include(candidate => candidate.Tags)
.Include(candidate => candidate.Screenshot)
.Where(candidate => candidate.Id == id && candidate.ReporterUserId == reporterUserId)
.Select(candidate => candidate.ToDto())
.SingleOrDefaultAsync(ct);
.Include(candidate => candidate.Comments)
.Include(candidate => candidate.ActivityEntries)
.SingleOrDefaultAsync(candidate => candidate.Id == id && candidate.ReporterUserId == reporterUserId, ct);
if (report is null)
{
@@ -33,6 +34,6 @@ public class GetMyFeedbackHandler(AppDbContext dbContext)
return;
}
await SendOkAsync(report, ct);
await SendOkAsync(report.ToDto(), ct);
}
}