This commit is contained in:
2020-09-03 21:58:58 +00:00
parent a3763b5503
commit 06601caac2
3 changed files with 23 additions and 11 deletions

View File

@@ -253,13 +253,19 @@ namespace AyaNova.Api.Controllers
var httpConnectionFeature = HttpContext.Features.Get<IHttpConnectionFeature>();
var API_URL = $"http://127.0.0.1:{httpConnectionFeature.LocalPort}/api/v8/";
try
{
var result = await biz.RenderReport(reportParam, API_URL);
var result = await biz.RenderReport(reportParam, API_URL);
if (string.IsNullOrWhiteSpace(result))
return BadRequest(new ApiErrorResponse(biz.Errors));
else
return Ok(ApiOkResponse.Response(result));
if (string.IsNullOrWhiteSpace(result))
return BadRequest(new ApiErrorResponse(biz.Errors));
else
return Ok(ApiOkResponse.Response(result));
}
catch (System.Exception ex)
{
return BadRequest(new ApiErrorResponse(ApiErrorCode.API_SERVER_ERROR, null, ex.Message));
}
}