diff --git a/CS2Interface/IPC/Api/CS2InterfaceController.cs b/CS2Interface/IPC/Api/CS2InterfaceController.cs index 3c869b5..5f32755 100644 --- a/CS2Interface/IPC/Api/CS2InterfaceController.cs +++ b/CS2Interface/IPC/Api/CS2InterfaceController.cs @@ -120,12 +120,12 @@ public async Task> InspectItem(string botNames, [F return Ok(new GenericResponse(true, item)); } - [HttpGet("{botName:required}/PlayerProfile/{steamID:required}")] + [HttpGet("{botName:required}/PlayerProfile/{steamID?}")] [SwaggerOperation (Summary = "Get a friend's CS2 player profile")] [ProducesResponseType(typeof(GenericResponse), (int) HttpStatusCode.OK)] [ProducesResponseType(typeof(GenericResponse), (int) HttpStatusCode.BadRequest)] [ProducesResponseType(typeof(GenericResponse), (int) HttpStatusCode.GatewayTimeout)] - public async Task> PlayerProfile(string botName, ulong steamID) { + public async Task> PlayerProfile(string botName, ulong? steamID = null) { if (string.IsNullOrEmpty(botName)) { throw new ArgumentNullException(nameof(botName)); } @@ -142,7 +142,7 @@ public async Task> PlayerProfile(string botName, u CMsgGCCStrike15_v2_PlayersProfile player; try { - player = await client.RequestPlayerProfile(steamID).ConfigureAwait(false); + player = await client.RequestPlayerProfile(steamID ?? bot.SteamID).ConfigureAwait(false); } catch (ClientException e) { return await HandleClientException(bot, e).ConfigureAwait(false); }