This commit is contained in:
2021-01-30 16:28:46 +00:00
parent b5ddfb211d
commit f8c87725ab
2 changed files with 9 additions and 16 deletions

View File

@@ -90,9 +90,6 @@ namespace AyaNova.Api.Controllers
if (!ModelState.IsValid)
return BadRequest(new ApiErrorResponse(ModelState));
if (selectedRequest.IsEmpty)
return BadRequest(new ApiErrorResponse(ApiErrorCode.VALIDATION_REQUIRED, null, "DataListSelectedRequest is required"));
if (!selectedRequest.ObjectType.HasAttribute(typeof(CoreBizObjectAttribute)))
return BadRequest(new ApiErrorResponse(ApiErrorCode.INVALID_OPERATION, null, "Not a taggable object type"));
@@ -186,9 +183,6 @@ namespace AyaNova.Api.Controllers
if (!ModelState.IsValid)
return BadRequest(new ApiErrorResponse(ModelState));
if (selectedRequest.IsEmpty)
return BadRequest(new ApiErrorResponse(ApiErrorCode.VALIDATION_REQUIRED, null, "DataListSelectedRequest is required"));
if (!selectedRequest.ObjectType.HasAttribute(typeof(CoreBizObjectAttribute)))
return BadRequest(new ApiErrorResponse(ApiErrorCode.INVALID_OPERATION, null, "Not a taggable object type"));
if (!Authorized.HasModifyRole(HttpContext.Items, selectedRequest.ObjectType))
@@ -283,8 +277,7 @@ namespace AyaNova.Api.Controllers
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
if (!ModelState.IsValid)
return BadRequest(new ApiErrorResponse(ModelState));
if (selectedRequest.IsEmpty)
return BadRequest(new ApiErrorResponse(ApiErrorCode.VALIDATION_REQUIRED, null, "DataListSelectedRequest is required"));
if (!selectedRequest.ObjectType.HasAttribute(typeof(CoreBizObjectAttribute)))
return BadRequest(new ApiErrorResponse(ApiErrorCode.INVALID_OPERATION, null, "Not a taggable object type"));
if (!Authorized.HasModifyRole(HttpContext.Items, selectedRequest.ObjectType))
@@ -295,8 +288,8 @@ namespace AyaNova.Api.Controllers
toTag = TagBiz.NormalizeTag(toTag);
if (string.IsNullOrWhiteSpace(toTag))
return BadRequest(new ApiErrorResponse(ApiErrorCode.VALIDATION_REQUIRED, null, "toTag"));
//Rehydrate id list if necessary
//Rehydrate id list if necessary
if (selectedRequest.SelectedRowIds.Length == 0)
selectedRequest.SelectedRowIds = await DataListSelectedProcessingOptions.RehydrateIdList(
selectedRequest,