From e21994d54c1e9a5c5337591e8e98b3a2aab0921d Mon Sep 17 00:00:00 2001 From: JustArchi Date: Thu, 20 Aug 2020 16:11:10 +0200 Subject: [PATCH] Remove deprecated endpoints --- .../IPC/Controllers/Api/BotController.cs | 26 ------------------- ...actorAuthenticationConfirmationsRequest.cs | 4 --- 2 files changed, 30 deletions(-) diff --git a/ArchiSteamFarm/IPC/Controllers/Api/BotController.cs b/ArchiSteamFarm/IPC/Controllers/Api/BotController.cs index fa360033d..39d4a536a 100644 --- a/ArchiSteamFarm/IPC/Controllers/Api/BotController.cs +++ b/ArchiSteamFarm/IPC/Controllers/Api/BotController.cs @@ -442,32 +442,6 @@ namespace ArchiSteamFarm.IPC.Controllers.Api { return Ok(new GenericResponse(results.All(result => result.Success), string.Join(Environment.NewLine, results.Select(result => result.Message)))); } - /// - /// Accepts 2FA confirmations of given bots, requires ASF 2FA module to be active on them. - /// - [HttpPost("{botNames:required}/TwoFactorAuthentication/Confirmations/Accept")] - [Obsolete] - [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(TwoFactorAuthenticationConfirmationsPost))); - - return await TwoFactorAuthenticationConfirmationsPost(botNames, new TwoFactorAuthenticationConfirmationsRequest(true)).ConfigureAwait(false); - } - - /// - /// Denies 2FA confirmations of given bots, requires ASF 2FA module to be active on them. - /// - [HttpPost("{botNames:required}/TwoFactorAuthentication/Confirmations/Cancel")] - [Obsolete] - [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(TwoFactorAuthenticationConfirmationsPost))); - - return await TwoFactorAuthenticationConfirmationsPost(botNames, new TwoFactorAuthenticationConfirmationsRequest(false)).ConfigureAwait(false); - } - /// /// Handles 2FA confirmations of given bots, requires ASF 2FA module to be active on them. /// diff --git a/ArchiSteamFarm/IPC/Requests/TwoFactorAuthenticationConfirmationsRequest.cs b/ArchiSteamFarm/IPC/Requests/TwoFactorAuthenticationConfirmationsRequest.cs index 9c6a35e7a..fc63a4473 100644 --- a/ArchiSteamFarm/IPC/Requests/TwoFactorAuthenticationConfirmationsRequest.cs +++ b/ArchiSteamFarm/IPC/Requests/TwoFactorAuthenticationConfirmationsRequest.cs @@ -19,7 +19,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -using System; using System.Collections.Generic; using System.Collections.Immutable; using System.Diagnostics.CodeAnalysis; @@ -81,9 +80,6 @@ namespace ArchiSteamFarm.IPC.Requests { } } - [Obsolete] - internal TwoFactorAuthenticationConfirmationsRequest(bool accept) => Accept = accept; - [JsonConstructor] private TwoFactorAuthenticationConfirmationsRequest() { } }