diff --git a/MainProgram/App.config b/MainProgram/App.config index ce2f15c..24193b8 100644 --- a/MainProgram/App.config +++ b/MainProgram/App.config @@ -9,6 +9,7 @@ + @@ -21,4 +22,16 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/MainProgram/Form1.cs b/MainProgram/Form1.cs index bafac4f..2b606c6 100644 --- a/MainProgram/Form1.cs +++ b/MainProgram/Form1.cs @@ -76,8 +76,8 @@ private async void generateFriendCode(string id) btnRefreshFriendCode.Enabled = false; string url = $"{apiEndpoint}/csgo/id-to-friendcode/{id}"; userId = id; - FriendCode fc = await url.GetJsonAsync(); - friendCode = fc.code; + UserInfoDTO fc = await url.GetJsonAsync(); + friendCode = fc.friendcode; txtFriendCode.Text = friendCode; } catch diff --git a/MainProgram/FriendCode.cs b/MainProgram/FriendCode.cs deleted file mode 100644 index 6298b1a..0000000 --- a/MainProgram/FriendCode.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace MainProgram -{ - public class FriendCode - { - public string code { get; set; } - } -} diff --git a/MainProgram/MainProgram.csproj b/MainProgram/MainProgram.csproj index 39aaa1b..6a8ebb6 100644 --- a/MainProgram/MainProgram.csproj +++ b/MainProgram/MainProgram.csproj @@ -30,7 +30,7 @@ bin\Release\ TRACE prompt - 4 + 1 @@ -55,6 +55,7 @@ + @@ -72,7 +73,7 @@ Form1.cs - + @@ -108,4 +109,8 @@ + + + + \ No newline at end of file diff --git a/MainProgram/UserInfoDTO.cs b/MainProgram/UserInfoDTO.cs new file mode 100644 index 0000000..fc378f5 --- /dev/null +++ b/MainProgram/UserInfoDTO.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MainProgram +{ + public class UserInfoDTO + { + public string steamId { get; set; } + public string friendcode { get; set; } + public string name { get; set; } + } +}