From ba30ac8e85f6c514a5ec8756a2702b7bc3a0fb21 Mon Sep 17 00:00:00 2001 From: JustArchi Date: Thu, 1 Aug 2019 12:39:34 +0200 Subject: [PATCH] Kill deprecated commands API endpoint --- .../IPC/Controllers/Api/CommandController.cs | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/ArchiSteamFarm/IPC/Controllers/Api/CommandController.cs b/ArchiSteamFarm/IPC/Controllers/Api/CommandController.cs index 4e1d5379b..bbd0063c6 100644 --- a/ArchiSteamFarm/IPC/Controllers/Api/CommandController.cs +++ b/ArchiSteamFarm/IPC/Controllers/Api/CommandController.cs @@ -77,26 +77,5 @@ namespace ArchiSteamFarm.IPC.Controllers.Api { return Ok(new GenericResponse(response)); } - - /// - /// Executes a command. - /// - /// - /// This API endpoint is supposed to be entirely replaced by ASF actions available under /Api/ASF/{action} and /Api/Bot/{bot}/{action}. - /// You should use "given bot" commands when executing this endpoint, omitting targets of the command will cause the command to be executed on first defined bot - /// - [HttpPost("{command:required}")] - [Obsolete] - [ProducesResponseType(typeof(GenericResponse), (int) HttpStatusCode.OK)] - [ProducesResponseType(typeof(GenericResponse), (int) HttpStatusCode.BadRequest)] - public async Task> ObsoleteCommandPost(string command) { - if (string.IsNullOrEmpty(command)) { - ASF.ArchiLogger.LogNullError(nameof(command)); - - return BadRequest(new GenericResponse(false, string.Format(Strings.ErrorIsEmpty, nameof(command)))); - } - - return await CommandPost(new CommandRequest(command)).ConfigureAwait(false); - } } }