From 137ad2bd3a6aa3223b79e1ad05c925fdd161d0aa Mon Sep 17 00:00:00 2001 From: Slendy Date: Sun, 13 Feb 2022 10:43:24 -0600 Subject: [PATCH] Last migration commit I promise --- ProjectLighthouse/Controllers/GameApi/ReportController.cs | 6 ------ ProjectLighthouse/Migrations/DatabaseModelSnapshot.cs | 3 --- ProjectLighthouse/Types/Reports/GriefReport.cs | 6 ------ 3 files changed, 15 deletions(-) diff --git a/ProjectLighthouse/Controllers/GameApi/ReportController.cs b/ProjectLighthouse/Controllers/GameApi/ReportController.cs index a7c482fb..b035d387 100644 --- a/ProjectLighthouse/Controllers/GameApi/ReportController.cs +++ b/ProjectLighthouse/Controllers/GameApi/ReportController.cs @@ -1,15 +1,11 @@ #nullable enable -using System; using System.IO; using System.Text.Json; using System.Threading.Tasks; using System.Xml.Serialization; -using Kettu; using LBPUnion.ProjectLighthouse.Types; using LBPUnion.ProjectLighthouse.Types.Reports; using Microsoft.AspNetCore.Mvc; -using System.Text.Json; -using System.Text.Json.Serialization; using LBPUnion.ProjectLighthouse.Helpers; namespace LBPUnion.ProjectLighthouse.Controllers.GameApi; @@ -35,7 +31,6 @@ public class ReportController : ControllerBase this.Request.Body.Position = 0; string bodyString = await new StreamReader(this.Request.Body).ReadToEndAsync(); - Console.WriteLine(bodyString); XmlSerializer serializer = new(typeof(GriefReport)); GriefReport? report = (GriefReport?) serializer.Deserialize(new StringReader(bodyString)); @@ -43,7 +38,6 @@ public class ReportController : ControllerBase report.Bounds = JsonSerializer.Serialize(report.XmlBounds.Rect, typeof(Rectangle)); report.Players = JsonSerializer.Serialize(report.XmlPlayers, typeof(ReportPlayer[])); - // report.VisiblePlayers = JsonSerializer.Serialize(report.XmlVisiblePlayers, typeof(VisiblePlayer[])); report.Timestamp = TimeHelper.UnixTimeMilliseconds(); report.ReportingPlayerId = user.UserId; diff --git a/ProjectLighthouse/Migrations/DatabaseModelSnapshot.cs b/ProjectLighthouse/Migrations/DatabaseModelSnapshot.cs index b4e5a89e..9f747f1c 100644 --- a/ProjectLighthouse/Migrations/DatabaseModelSnapshot.cs +++ b/ProjectLighthouse/Migrations/DatabaseModelSnapshot.cs @@ -542,9 +542,6 @@ namespace ProjectLighthouse.Migrations b.Property("Type") .HasColumnType("int"); - b.Property("VisiblePlayers") - .HasColumnType("longtext"); - b.HasKey("ReportId"); b.HasIndex("ReportingPlayerId"); diff --git a/ProjectLighthouse/Types/Reports/GriefReport.cs b/ProjectLighthouse/Types/Reports/GriefReport.cs index 78b6e61a..e0727b6a 100644 --- a/ProjectLighthouse/Types/Reports/GriefReport.cs +++ b/ProjectLighthouse/Types/Reports/GriefReport.cs @@ -15,12 +15,6 @@ public class GriefReport public long Timestamp { get; set; } - [NotMapped] - // [XmlElement("visibleBadge")] - // public VisiblePlayer[] XmlVisiblePlayers { get; set; } - - public string VisiblePlayers { get; set; } - public int ReportingPlayerId { get; set; } [ForeignKey(nameof(ReportingPlayerId))]