diff --git a/ArchiSteamFarm/IPC/Controllers/Api/BotController.cs b/ArchiSteamFarm/IPC/Controllers/Api/BotController.cs index 8c8449ce8..fa360033d 100644 --- a/ArchiSteamFarm/IPC/Controllers/Api/BotController.cs +++ b/ArchiSteamFarm/IPC/Controllers/Api/BotController.cs @@ -450,9 +450,9 @@ namespace ArchiSteamFarm.IPC.Controllers.Api { [ProducesResponseType(typeof(GenericResponse>), (int) HttpStatusCode.OK)] [ProducesResponseType(typeof(GenericResponse), (int) HttpStatusCode.BadRequest)] public async Task> TwoFactorAuthenticationConfirmationsAcceptPost(string botNames) { - ASF.ArchiLogger.LogGenericWarning(string.Format(Strings.WarningDeprecated, nameof(TwoFactorAuthenticationConfirmationsAcceptPost), nameof(TwoFactorAuthenticationConfirmationsHandlePost))); + ASF.ArchiLogger.LogGenericWarning(string.Format(Strings.WarningDeprecated, nameof(TwoFactorAuthenticationConfirmationsAcceptPost), nameof(TwoFactorAuthenticationConfirmationsPost))); - return await TwoFactorAuthenticationConfirmationsHandlePost(botNames, new TwoFactorAuthenticationConfirmationsHandleRequest(true)).ConfigureAwait(false); + return await TwoFactorAuthenticationConfirmationsPost(botNames, new TwoFactorAuthenticationConfirmationsRequest(true)).ConfigureAwait(false); } /// @@ -463,18 +463,18 @@ namespace ArchiSteamFarm.IPC.Controllers.Api { [ProducesResponseType(typeof(GenericResponse>), (int) HttpStatusCode.OK)] [ProducesResponseType(typeof(GenericResponse), (int) HttpStatusCode.BadRequest)] public async Task> TwoFactorAuthenticationConfirmationsCancelPost(string botNames) { - ASF.ArchiLogger.LogGenericWarning(string.Format(Strings.WarningDeprecated, nameof(TwoFactorAuthenticationConfirmationsCancelPost), nameof(TwoFactorAuthenticationConfirmationsHandlePost))); + ASF.ArchiLogger.LogGenericWarning(string.Format(Strings.WarningDeprecated, nameof(TwoFactorAuthenticationConfirmationsCancelPost), nameof(TwoFactorAuthenticationConfirmationsPost))); - return await TwoFactorAuthenticationConfirmationsHandlePost(botNames, new TwoFactorAuthenticationConfirmationsHandleRequest(false)).ConfigureAwait(false); + return await TwoFactorAuthenticationConfirmationsPost(botNames, new TwoFactorAuthenticationConfirmationsRequest(false)).ConfigureAwait(false); } /// /// Handles 2FA confirmations of given bots, requires ASF 2FA module to be active on them. /// - [HttpPost("{botNames:required}/TwoFactorAuthentication/Confirmations/Handle")] + [HttpPost("{botNames:required}/TwoFactorAuthentication/Confirmations")] [ProducesResponseType(typeof(GenericResponse>), (int) HttpStatusCode.OK)] [ProducesResponseType(typeof(GenericResponse), (int) HttpStatusCode.BadRequest)] - public async Task> TwoFactorAuthenticationConfirmationsHandlePost(string botNames, [FromBody] TwoFactorAuthenticationConfirmationsHandleRequest request) { + public async Task> TwoFactorAuthenticationConfirmationsPost(string botNames, [FromBody] TwoFactorAuthenticationConfirmationsRequest request) { if (string.IsNullOrEmpty(botNames) || (request == null)) { ASF.ArchiLogger.LogNullError(nameof(botNames)); diff --git a/ArchiSteamFarm/IPC/Requests/TwoFactorAuthenticationConfirmationsHandleRequest.cs b/ArchiSteamFarm/IPC/Requests/TwoFactorAuthenticationConfirmationsRequest.cs similarity index 94% rename from ArchiSteamFarm/IPC/Requests/TwoFactorAuthenticationConfirmationsHandleRequest.cs rename to ArchiSteamFarm/IPC/Requests/TwoFactorAuthenticationConfirmationsRequest.cs index 059f28065..9c6a35e7a 100644 --- a/ArchiSteamFarm/IPC/Requests/TwoFactorAuthenticationConfirmationsHandleRequest.cs +++ b/ArchiSteamFarm/IPC/Requests/TwoFactorAuthenticationConfirmationsRequest.cs @@ -28,7 +28,7 @@ using Newtonsoft.Json; namespace ArchiSteamFarm.IPC.Requests { [SuppressMessage("ReSharper", "ClassCannotBeInstantiated")] - public sealed class TwoFactorAuthenticationConfirmationsHandleRequest { + public sealed class TwoFactorAuthenticationConfirmationsRequest { /// /// Specifies the target action, whether we should accept the confirmations (true), or decline them (false). /// @@ -82,9 +82,9 @@ namespace ArchiSteamFarm.IPC.Requests { } [Obsolete] - internal TwoFactorAuthenticationConfirmationsHandleRequest(bool accept) => Accept = accept; + internal TwoFactorAuthenticationConfirmationsRequest(bool accept) => Accept = accept; [JsonConstructor] - private TwoFactorAuthenticationConfirmationsHandleRequest() { } + private TwoFactorAuthenticationConfirmationsRequest() { } } }