Skip to content

Commit 4032a82

Browse files
committed
Fix bug on V1 Api reporting.
修复V1 Api上报出错的问题
1 parent 63d0bee commit 4032a82

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

HousingCheck/HousingCheck.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,18 @@ public bool UploadData(string type, string postContent, string mime = "applicati
424424
wb.Headers[HttpRequestHeader.Authorization] = "Token " + token;
425425
}
426426
wb.Headers[HttpRequestHeader.ContentType] = mime;
427-
var url = control.UploadUrl.TrimEnd('/') + "/" + type;
427+
428+
string url;
429+
switch (control.UploadApiVersion)
430+
{
431+
case ApiVersion.V1:
432+
url = control.UploadUrl;
433+
break;
434+
case ApiVersion.V2:
435+
default:
436+
url = control.UploadUrl.TrimEnd('/') + "/" + type;
437+
break;
438+
}
428439
Monitor.Exit(this);
429440
try
430441
{

HousingCheck/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.3.4.0")]
36-
[assembly: AssemblyFileVersion("1.3.4.0")]
35+
[assembly: AssemblyVersion("1.3.5.0")]
36+
[assembly: AssemblyFileVersion("1.3.5.0")]

0 commit comments

Comments
 (0)