@using System.ComponentModel.DataAnnotations @using ImageBoardServerApp.Data.Repository @inject NavigationManager navigationManager
@if (report.Type == "op") { /@report.ReportedPost.Board/ } else { /@report.ReportedComment.Board/ } #@report.ReportID @report.Type
Reason: @report.ReportReason
Explaination: @report.ReportExlaination
Ban User: 1d 1w 1m 1yr 273,972.6 yrs
Ban Reporter: 1d 1w 1m 1yr 273,972.6 yrs
Done
@if (report.Type == "op") { } else { }
@code { [Parameter] [Required] public ReportData report { get; set; } private async Task banTarget(int days) { UserData user = report.UserReported; user.TimeBanned = DateTimeOffset.Now.AddDays(days).ToUnixTimeMilliseconds(); await UsersRepository.updateUserAsync(user); await removeReport(); } private async Task banReporter(int days) { UserData user = report.UserReporter; user.TimeBanned = DateTimeOffset.Now.AddDays(days).ToUnixTimeMilliseconds(); await UsersRepository.updateUserAsync(user); await removeReport(); } private async Task removeReport() { await ReportsRepository.deleteReportAsync(report.ReportID); navigationManager.NavigateTo("/sys/reports", true, true); } }