Skip to content

Commit

Permalink
Fix bug on V1 Api reporting.
Browse files Browse the repository at this point in the history
修复V1 Api上报出错的问题
  • Loading branch information
hyperzlib committed Apr 1, 2021
1 parent 63d0bee commit 4032a82
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
13 changes: 12 additions & 1 deletion HousingCheck/HousingCheck.cs
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,18 @@ public bool UploadData(string type, string postContent, string mime = "applicati
wb.Headers[HttpRequestHeader.Authorization] = "Token " + token;
}
wb.Headers[HttpRequestHeader.ContentType] = mime;
var url = control.UploadUrl.TrimEnd('/') + "/" + type;

string url;
switch (control.UploadApiVersion)
{
case ApiVersion.V1:
url = control.UploadUrl;
break;
case ApiVersion.V2:
default:
url = control.UploadUrl.TrimEnd('/') + "/" + type;
break;
}
Monitor.Exit(this);
try
{
Expand Down
4 changes: 2 additions & 2 deletions HousingCheck/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.3.4.0")]
[assembly: AssemblyFileVersion("1.3.4.0")]
[assembly: AssemblyVersion("1.3.5.0")]
[assembly: AssemblyFileVersion("1.3.5.0")]

0 comments on commit 4032a82

Please sign in to comment.