fix(#IX75C): 修复GiteeController内部错误

#Comment
comment #IX75C
相关提交 commit:1cfbf639a27c623204b9517d9d5da7a7ae601d93
#Issue
close https://gitee.com/LongbowEnterprise/dashboard/issues?id=IX75C
This commit is contained in:
Argo Zhang 2019-05-29 23:22:37 +08:00
parent 33ff412eba
commit 2574aa187d
1 changed files with 1 additions and 1 deletions

View File

@ -90,7 +90,7 @@ namespace Bootstrap.Admin.Controllers.Api
{
var client = httpClientFactory.CreateClient();
var content = await GetJsonAsync(() => client.GetAsJsonAsync<AppveyorBuildResult>($"https://ci.appveyor.com/api/projects/{userName}/{projName}/branch/{branchName}"));
return new JsonResult(new { schemaVersion = 1, label, message = content.Build.Version, color });
return new JsonResult(new { schemaVersion = 1, label, message = content == null ? "unknown" : content.Build.Version, color });
}
private async static Task<T> GetJsonAsync<T>(Func<Task<T>> callback)