This commit is contained in:
2020-10-27 00:08:07 +00:00
parent 043a62e89e
commit c0b791a997
2 changed files with 7 additions and 6 deletions

View File

@@ -58,7 +58,8 @@ namespace AyaNova.Api.Controllers
// AyaTypeId attachToObject = null;
ApiUploadProcessor.ApiUploadedFilesResult uploadFormData = null;
List<string> ImportResult=new List<string>();
List<string> ImportResult = new List<string>();
ImportResult.Add("Import results\n");
try
{
if (!MultipartRequestHelper.IsMultipartContentType(Request.ContentType))
@@ -104,7 +105,7 @@ namespace AyaNova.Api.Controllers
foreach (UploadedFileInfo a in uploadFormData.UploadedFiles)
{
JArray ja = JArray.Parse(System.IO.File.ReadAllText(a.InitialUploadedPathName));
ImportResult.AddRange(await ((IImportAbleObject)biz).ImportData(ja));
ImportResult.AddRange(await ((IImportAbleObject)biz).ImportData(ja));
}
}
}
@@ -119,8 +120,7 @@ namespace AyaNova.Api.Controllers
ApiUploadProcessor.DeleteTempUploadFile(uploadFormData);
}
//TODO: Return results of operation here
return Ok(ImportResult);
return Ok(ApiOkResponse.Response(ImportResult));
}