public async Task <ActionResult> DeleteResourceSet(string id, string resourceId) { if (string.IsNullOrWhiteSpace(id)) { throw new ArgumentNullException(nameof(id)); } if (string.IsNullOrWhiteSpace(resourceId)) { throw new ArgumentNullException(nameof(resourceId)); } var isPolicyExists = await _policyActions.DeleteResourceSet(id, resourceId); if (!isPolicyExists) { return(GetNotFoundPolicy()); } await _representationManager.AddOrUpdateRepresentationAsync(this, CachingStoreNames.GetPolicyStoreName + id, false); return(new StatusCodeResult((int)HttpStatusCode.NoContent)); }
public async Task <ActionResult> DeleteResourceSet(string id, string resourceId) { if (string.IsNullOrWhiteSpace(id)) { return(BuildError(ErrorCodes.InvalidRequestCode, "the identifier must be specified", HttpStatusCode.BadRequest)); } if (string.IsNullOrWhiteSpace(resourceId)) { return(BuildError(ErrorCodes.InvalidRequestCode, "the resource_id must be specified", HttpStatusCode.BadRequest)); } var isPolicyExists = await _policyActions.DeleteResourceSet(id, resourceId); if (!isPolicyExists) { return(GetNotFoundPolicy()); } await _representationManager.AddOrUpdateRepresentationAsync(this, Constants.CachingStoreNames.GetPolicyStoreName + id, false); return(new StatusCodeResult((int)HttpStatusCode.NoContent)); }