From 3027f16f4eef8f8122b5aa512142ce511f1a8ba5 Mon Sep 17 00:00:00 2001 From: JustArchi Date: Fri, 14 Sep 2018 23:02:15 +0200 Subject: [PATCH] Rename /Api/Log -> /Api/NLog Keep compatibility with old endpoint for time being --- ArchiSteamFarm/IPC/ArchiKestrel.cs | 4 ++-- .../Controllers/Api/{LogController.cs => NLogController.cs} | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) rename ArchiSteamFarm/IPC/Controllers/Api/{LogController.cs => NLogController.cs} (98%) diff --git a/ArchiSteamFarm/IPC/ArchiKestrel.cs b/ArchiSteamFarm/IPC/ArchiKestrel.cs index 188449fcf..cd2cf1f70 100644 --- a/ArchiSteamFarm/IPC/ArchiKestrel.cs +++ b/ArchiSteamFarm/IPC/ArchiKestrel.cs @@ -40,12 +40,12 @@ namespace ArchiSteamFarm.IPC { internal static void OnNewHistoryTarget(HistoryTarget historyTarget = null) { if (HistoryTarget != null) { - HistoryTarget.NewHistoryEntry -= LogController.OnNewHistoryEntry; + HistoryTarget.NewHistoryEntry -= NLogController.OnNewHistoryEntry; HistoryTarget = null; } if (historyTarget != null) { - historyTarget.NewHistoryEntry += LogController.OnNewHistoryEntry; + historyTarget.NewHistoryEntry += NLogController.OnNewHistoryEntry; HistoryTarget = historyTarget; } } diff --git a/ArchiSteamFarm/IPC/Controllers/Api/LogController.cs b/ArchiSteamFarm/IPC/Controllers/Api/NLogController.cs similarity index 98% rename from ArchiSteamFarm/IPC/Controllers/Api/LogController.cs rename to ArchiSteamFarm/IPC/Controllers/Api/NLogController.cs index e229b1851..52177695e 100644 --- a/ArchiSteamFarm/IPC/Controllers/Api/LogController.cs +++ b/ArchiSteamFarm/IPC/Controllers/Api/NLogController.cs @@ -33,8 +33,9 @@ using Newtonsoft.Json; namespace ArchiSteamFarm.IPC.Controllers.Api { [ApiController] + [Route("Api/NLog")] [Route("Api/Log")] - public sealed class LogController : ControllerBase { + public sealed class NLogController : ControllerBase { private static readonly ConcurrentDictionary ActiveLogWebSockets = new ConcurrentDictionary(); [HttpGet]