From 201c2967c26f7e4a2950455812ac7f708866885d Mon Sep 17 00:00:00 2001 From: JustArchi Date: Mon, 15 Oct 2018 23:21:40 +0200 Subject: [PATCH] Misc interface changes --- .../IPC/Controllers/Api/BotController.cs | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/ArchiSteamFarm/IPC/Controllers/Api/BotController.cs b/ArchiSteamFarm/IPC/Controllers/Api/BotController.cs index abf9d0b5a..e6c9a239a 100644 --- a/ArchiSteamFarm/IPC/Controllers/Api/BotController.cs +++ b/ArchiSteamFarm/IPC/Controllers/Api/BotController.cs @@ -57,19 +57,19 @@ namespace ArchiSteamFarm.IPC.Controllers.Api { /// Fetches common info related to given bots. /// [HttpGet("{botNames:required}")] - [ProducesResponseType(typeof(GenericResponse>), 200)] - public ActionResult>> BotGet(string botNames) { + [ProducesResponseType(typeof(GenericResponse>), 200)] + public ActionResult>> BotGet(string botNames) { if (string.IsNullOrEmpty(botNames)) { ASF.ArchiLogger.LogNullError(nameof(botNames)); - return BadRequest(new GenericResponse>(false, string.Format(Strings.ErrorIsEmpty, nameof(botNames)))); + return BadRequest(new GenericResponse>(false, string.Format(Strings.ErrorIsEmpty, nameof(botNames)))); } HashSet bots = Bot.GetBots(botNames); if (bots == null) { - return BadRequest(new GenericResponse>(false, string.Format(Strings.ErrorIsInvalid, nameof(bots)))); + return BadRequest(new GenericResponse>(false, string.Format(Strings.ErrorIsInvalid, nameof(bots)))); } - return Ok(new GenericResponse>(bots.ToDictionary(bot => bot.BotName, bot => bot))); + return Ok(new GenericResponse>(bots.ToDictionary(bot => bot.BotName, bot => bot))); } /// @@ -164,23 +164,23 @@ namespace ArchiSteamFarm.IPC.Controllers.Api { /// [Consumes("application/json")] [HttpPost("{botName:required}/GamesToRedeemInBackground")] - [ProducesResponseType(typeof(GenericResponse), 200)] - public async Task>> GamesToRedeemInBackgroundPost(string botName, [FromBody] GamesToRedeemInBackgroundRequest request) { + [ProducesResponseType(typeof(GenericResponse), 200)] + public async Task>> GamesToRedeemInBackgroundPost(string botName, [FromBody] GamesToRedeemInBackgroundRequest request) { if (string.IsNullOrEmpty(botName) || (request == null)) { ASF.ArchiLogger.LogNullError(nameof(botName) + " || " + nameof(request)); - return BadRequest(new GenericResponse(false, string.Format(Strings.ErrorIsEmpty, nameof(botName) + " || " + nameof(request)))); + return BadRequest(new GenericResponse(false, string.Format(Strings.ErrorIsEmpty, nameof(botName) + " || " + nameof(request)))); } if (request.GamesToRedeemInBackground.Count == 0) { - return BadRequest(new GenericResponse(false, string.Format(Strings.ErrorIsEmpty, nameof(request.GamesToRedeemInBackground)))); + return BadRequest(new GenericResponse(false, string.Format(Strings.ErrorIsEmpty, nameof(request.GamesToRedeemInBackground)))); } if (!Bot.Bots.TryGetValue(botName, out Bot bot)) { - return BadRequest(new GenericResponse(false, string.Format(Strings.BotNotFound, botName))); + return BadRequest(new GenericResponse(false, string.Format(Strings.BotNotFound, botName))); } bool result = await bot.ValidateAndAddGamesToRedeemInBackground(request.GamesToRedeemInBackground).ConfigureAwait(false); - return Ok(new GenericResponse(result, request.GamesToRedeemInBackground)); + return Ok(new GenericResponse(result, request.GamesToRedeemInBackground)); } ///