@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: 1h 2h 1d 1w 1m 1yr
Ban Reporter: 1h 2h 1d 1w 1m 1yr
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.ToUnixTimeMilliseconds() + (days * 3600000); user.BanReason = report.ReportReason; await UsersRepository.updateUserAsync(user); await removeReport(); } private async Task banReporter(int days) { UserData user = report.UserReporter; user.TimeBanned = DateTimeOffset.Now.ToUnixTimeMilliseconds() + (days * 3600000); user.BanReason = "misuse of the report system"; await UsersRepository.updateUserAsync(user); await removeReport(); } private async Task removeReport() { await ReportsRepository.deleteReportAsync(report.ReportID); navigationManager.NavigateTo("/sys/click/red/_sys_modmenu_reports", true, true); } }