This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user