diff --git a/ElectronicObserver/Data/PoiDbSubmission/Extensions.cs b/ElectronicObserver/Data/PoiDbSubmission/Extensions.cs index 57e3b281f..901622d77 100644 --- a/ElectronicObserver/Data/PoiDbSubmission/Extensions.cs +++ b/ElectronicObserver/Data/PoiDbSubmission/Extensions.cs @@ -32,15 +32,15 @@ public static JsonNode MakeShip(this IShipData ship) null => null, _ => new() { - ApiId = equipment.MasterID, - ApiSlotitemId = equipment.EquipmentID, + ApiId = equipment.MasterID.ToString(), + ApiSlotitemId = equipment.EquipmentID.ToString(), ApiLocked = equipment.IsLocked switch { - true => 1, - false => 0, + true => "1", + false => "0", }, - ApiLevel = equipment.Level, - ApiAlv = equipment.AircraftLevel, + ApiLevel = equipment.Level.ToString(), + ApiAlv = equipment.AircraftLevel.ToString(), }, }; diff --git a/ElectronicObserver/Data/PoiDbSubmission/PoiDbRouteSubmission/PoiDbRouteEquipment.cs b/ElectronicObserver/Data/PoiDbSubmission/PoiDbRouteSubmission/PoiDbRouteEquipment.cs index 68abede19..bb882af4b 100644 --- a/ElectronicObserver/Data/PoiDbSubmission/PoiDbRouteSubmission/PoiDbRouteEquipment.cs +++ b/ElectronicObserver/Data/PoiDbSubmission/PoiDbRouteSubmission/PoiDbRouteEquipment.cs @@ -5,17 +5,17 @@ namespace ElectronicObserver.Data.PoiDbSubmission.PoiDbRouteSubmission; public class PoiDbRouteEquipment { [JsonPropertyName("api_id")] - public required int ApiId { get; init; } + public required string ApiId { get; init; } [JsonPropertyName("api_slotitem_id")] - public required int ApiSlotitemId { get; init; } + public required string ApiSlotitemId { get; init; } [JsonPropertyName("api_locked")] - public required int ApiLocked { get; init; } + public required string ApiLocked { get; init; } [JsonPropertyName("api_level")] - public required int ApiLevel { get; init; } + public required string ApiLevel { get; init; } [JsonPropertyName("api_alv")] - public required int ApiAlv { get; init; } + public required string ApiAlv { get; init; } } diff --git a/ElectronicObserver/Data/PoiDbSubmission/PoiDbRouteSubmission/PoiDbRouteShip.cs b/ElectronicObserver/Data/PoiDbSubmission/PoiDbRouteSubmission/PoiDbRouteShip.cs index 016a9931e..ca7331f4a 100644 --- a/ElectronicObserver/Data/PoiDbSubmission/PoiDbRouteSubmission/PoiDbRouteShip.cs +++ b/ElectronicObserver/Data/PoiDbSubmission/PoiDbRouteSubmission/PoiDbRouteShip.cs @@ -5,20 +5,20 @@ namespace ElectronicObserver.Data.PoiDbSubmission.PoiDbRouteSubmission; public class PoiDbRouteShip { [JsonPropertyName("api_ship_id")] - public required int ApiShipId { get; init; } + public required string ApiShipId { get; init; } [JsonPropertyName("api_lv")] - public required int ApiLv { get; init; } + public required string ApiLv { get; init; } [JsonPropertyName("api_sally_area")] - public required int? ApiSallyArea { get; init; } + public required string? ApiSallyArea { get; init; } [JsonPropertyName("api_soku")] - public required int ApiSoku { get; init; } + public required string ApiSoku { get; init; } [JsonPropertyName("api_slotitem_ex")] - public required int ApiSlotitemEx { get; init; } + public required string ApiSlotitemEx { get; init; } [JsonPropertyName("api_slotitem_level")] - public required int ApiSlotitemLevel { get; init; } + public required string ApiSlotitemLevel { get; init; } } diff --git a/ElectronicObserver/Data/PoiDbSubmission/PoiDbRouteSubmission/PoiDbRouteSubmissionService.cs b/ElectronicObserver/Data/PoiDbSubmission/PoiDbRouteSubmission/PoiDbRouteSubmissionService.cs index 441f6427b..de7b5cd5c 100644 --- a/ElectronicObserver/Data/PoiDbSubmission/PoiDbRouteSubmission/PoiDbRouteSubmissionService.cs +++ b/ElectronicObserver/Data/PoiDbSubmission/PoiDbRouteSubmission/PoiDbRouteSubmissionService.cs @@ -136,7 +136,7 @@ private void SubmitData() List> slot1 = Fleet1.MembersInstance! .OfType() .Select(s => s.SlotInstance - .Select(e => e.MakePoiEquipment() ?? (object)-1) + .Select(e => e.MakePoiEquipment() ?? (object)"-1") .ToList()) .ToList(); @@ -209,16 +209,16 @@ private void SubmitData() private static PoiDbRouteShip MakeShip(IShipData ship) => new() { - ApiShipId = ship.ShipID, - ApiLv = ship.Level, + ApiShipId = ship.ShipID.ToString(), + ApiLv = ship.Level.ToString(), ApiSallyArea = ship.SallyArea switch { - > 0 => ship.SallyArea, + > 0 => ship.SallyArea.ToString(), _ => null, }, - ApiSoku = ship.Speed, - ApiSlotitemEx = ship.ExpansionSlotInstance?.EquipmentID ?? -1, - ApiSlotitemLevel = ship.ExpansionSlotInstance?.Level ?? -1, + ApiSoku = ship.Speed.ToString(), + ApiSlotitemEx = ship.ExpansionSlotInstance?.EquipmentID.ToString() ?? "-1", + ApiSlotitemLevel = ship.ExpansionSlotInstance?.Level.ToString() ?? "-1", }; [return: NotNullIfNotNull(nameof(fleet))]