mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-26 20:27:55 +00:00
Last migration commit I promise
This commit is contained in:
parent
0ca89b7535
commit
137ad2bd3a
3 changed files with 0 additions and 15 deletions
|
@ -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;
|
||||
|
||||
|
|
|
@ -542,9 +542,6 @@ namespace ProjectLighthouse.Migrations
|
|||
b.Property<int>("Type")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("VisiblePlayers")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.HasKey("ReportId");
|
||||
|
||||
b.HasIndex("ReportingPlayerId");
|
||||
|
|
|
@ -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))]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue