feat: report page, take action on reports

This commit is contained in:
sam 2025-02-03 17:03:32 +01:00
parent a0ba712632
commit cacd3a30b7
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
14 changed files with 502 additions and 14 deletions

View file

@ -16,6 +16,7 @@
// ReSharper disable NotAccessedPositionalProperty.Global
using Foxnouns.Backend.Database;
using Foxnouns.Backend.Database.Models;
using Foxnouns.Backend.Utils;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using NodaTime;
@ -80,15 +81,17 @@ public record CreateReportRequest(ReportReason Reason, string? Context = null);
public record IgnoreReportRequest(string? Reason = null);
public record WarnUserRequest(
string Reason,
FieldsToClear[]? ClearFields = null,
Snowflake? MemberId = null,
Snowflake? ReportId = null
);
public class WarnUserRequest
{
public required string Reason { get; init; }
public FieldsToClear[]? ClearFields { get; init; }
public Snowflake? MemberId { get; init; }
public Snowflake? ReportId { get; init; }
}
public record SuspendUserRequest(string Reason, bool ClearProfile, Snowflake? ReportId = null);
[JsonConverter(typeof(ScreamingSnakeCaseEnumConverter))]
public enum FieldsToClear
{
DisplayName,