From a46d0f705f418c8de21f071d25a05a6772712315 Mon Sep 17 00:00:00 2001 From: Alex Macocian Date: Fri, 16 Aug 2024 09:58:30 +0200 Subject: [PATCH] Remove error message for faulty update Return map name in activity --- GuildWarsPartySearch/Endpoints/PostPartySearch.cs | 2 +- GuildWarsPartySearch/Endpoints/StatusController.cs | 3 ++- GuildWarsPartySearch/Models/Endpoints/MapActivity.cs | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/GuildWarsPartySearch/Endpoints/PostPartySearch.cs b/GuildWarsPartySearch/Endpoints/PostPartySearch.cs index bf67ce0..6177880 100644 --- a/GuildWarsPartySearch/Endpoints/PostPartySearch.cs +++ b/GuildWarsPartySearch/Endpoints/PostPartySearch.cs @@ -85,7 +85,7 @@ public override async Task ExecuteAsync(PostPartySearchRequest? message, Cancell if (message?.Map == Map.None && message.District == 0) { - scopedLogger.LogError("Detected faulty update. Will not update location"); + scopedLogger.LogDebug("Detected empty update message. Will not update location"); var faultyResponse = await Success; if (message.GetFullList) { diff --git a/GuildWarsPartySearch/Endpoints/StatusController.cs b/GuildWarsPartySearch/Endpoints/StatusController.cs index 345e07c..6712ae2 100644 --- a/GuildWarsPartySearch/Endpoints/StatusController.cs +++ b/GuildWarsPartySearch/Endpoints/StatusController.cs @@ -97,7 +97,8 @@ public async Task GetActiveMaps() { District = b.District, MapId = b.Map?.Id ?? -1, - LastUpdate = b.LastSeen ?? DateTime.MinValue + MapName = b?.Map?.Name ?? default, + LastUpdate = b?.LastSeen ?? DateTime.MinValue })); } } diff --git a/GuildWarsPartySearch/Models/Endpoints/MapActivity.cs b/GuildWarsPartySearch/Models/Endpoints/MapActivity.cs index af2e821..0e22f9a 100644 --- a/GuildWarsPartySearch/Models/Endpoints/MapActivity.cs +++ b/GuildWarsPartySearch/Models/Endpoints/MapActivity.cs @@ -8,6 +8,8 @@ public class MapActivity public int MapId { get; set; } [JsonProperty(nameof(District))] public int District { get; set; } + [JsonProperty(nameof(MapName))] + public string? MapName { get; set; } [JsonProperty(nameof(LastUpdate))] public DateTime LastUpdate { get; set; } }