Batch is the new Bulk

This commit is contained in:
2020-12-10 19:29:00 +00:00
parent 379673981f
commit 61cc48530a
17 changed files with 70 additions and 206 deletions

View File

@@ -113,7 +113,7 @@ namespace AyaNova.Api.Controllers
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
//## NOTE: deliberately do *not* check for authorization as this is called by any bulk operation users may submit via extensions
//## NOTE: deliberately do *not* check for authorization as this is called by any batch operation users may submit via extensions
//and the user would need the exact Guid to view a job so not likely they will fish for it in a nefarious way
// if (!Authorized.HasReadFullRole(HttpContext.Items, AyaType.ServerJob))
// {
@@ -185,7 +185,7 @@ namespace AyaNova.Api.Controllers
////////////////////////////////////////////////////////////////////////////////////////////////
// EXTENSION BULK JOBS
// EXTENSION BATCH JOBS
//
//
@@ -195,8 +195,8 @@ namespace AyaNova.Api.Controllers
/// </summary>
/// <param name="dataListSelection"></param>
/// <returns>Job Id</returns>
[HttpPost("bulk-delete")]
public async Task<IActionResult> BulkDeleteObjects([FromBody] DataListSelection dataListSelection)
[HttpPost("batch-delete")]
public async Task<IActionResult> BatchDeleteObjects([FromBody] DataListSelection dataListSelection)
{
if (!serverState.IsOpen)
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
@@ -224,7 +224,7 @@ namespace AyaNova.Api.Controllers
OpsJob j = new OpsJob();
j.Name = JobName;
j.ObjectType = dataListSelection.ObjectType;
j.JobType = JobType.BulkCoreBizObjectOperation;
j.JobType = JobType.BatchCoreObjectOperation;
j.SubType = JobSubType.Delete;
j.Exclusive = false;
j.JobInfo = o.ToString();