Skip to content

Commit

Permalink
#168 - fixed passing second parameter to the request for ChangeLangua…
Browse files Browse the repository at this point in the history
…geVariantWorkflowAsync
  • Loading branch information
robert.stebel authored and gormal committed Apr 11, 2022
1 parent 96c68e7 commit 2f1a898
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions Kentico.Kontent.Management/ManagementClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public async Task<AssetModel> CreateAssetAsync(AssetCreateModel asset)
{
throw new ArgumentNullException(nameof(asset));
}

var result = await CreateAssetAsync(_modelProvider.GetAssetCreateModel(asset));

return _modelProvider.GetAssetModel<T>(result);
Expand Down Expand Up @@ -239,16 +239,16 @@ public async Task<FileReference> UploadFileAsync(FileContentSource fileContent)
}
}
}


/// <inheritdoc />
public async Task<AssetRenditionModel> GetAssetRenditionAsync(AssetRenditionIdentifier identifier)
{
if (identifier == null)
{
throw new ArgumentNullException(nameof(identifier));
}

var endpointUrl = _urlBuilder.BuildAssetRenditionsUrl(identifier);
return await _actionInvoker.InvokeReadOnlyMethodAsync<AssetRenditionModel>(endpointUrl, HttpMethod.Get);
}
Expand All @@ -260,10 +260,10 @@ public async Task<IListingResponseModel<AssetRenditionModel>> ListAssetRendition
{
throw new ArgumentNullException(nameof(assetIdentifier));
}

var endpointUrl = _urlBuilder.BuildAssetRenditionsUrl(assetIdentifier);
var response = await _actionInvoker.InvokeReadOnlyMethodAsync<AssetRenditionsListingResponseServerModel>(endpointUrl, HttpMethod.Get);

return new ListingResponseModel<AssetRenditionModel>(
GetNextListingPageAsync<AssetRenditionsListingResponseServerModel, AssetRenditionModel>,
response.Pagination?.Token,
Expand All @@ -283,7 +283,7 @@ public async Task<AssetRenditionModel> CreateAssetRenditionAsync(Reference asset
{
throw new ArgumentNullException(nameof(createModel));
}

var endpointUrl = _urlBuilder.BuildAssetRenditionsUrl(assetIdentifier);
return await _actionInvoker.InvokeMethodAsync<AssetRenditionCreateModel, AssetRenditionModel>(endpointUrl, HttpMethod.Post, createModel);
}
Expand All @@ -299,7 +299,7 @@ public async Task<AssetRenditionModel> UpdateAssetRenditionAsync(AssetRenditionI
{
throw new ArgumentNullException(nameof(updateModel));
}

var endpointUrl = _urlBuilder.BuildAssetRenditionsUrl(identifier);
return await _actionInvoker.InvokeMethodAsync<AssetRenditionUpdateModel, AssetRenditionModel>(endpointUrl, HttpMethod.Put, updateModel);
}
Expand Down Expand Up @@ -818,16 +818,16 @@ public async Task ChangeLanguageVariantWorkflowAsync(LanguageVariantIdentifier i
if (identifier == null)
{
throw new ArgumentNullException(nameof(identifier));
}
}

if (workflowStepIdentifier == null)
{
throw new ArgumentNullException(nameof(workflowStepIdentifier));
if (workflowStepIdentifier == null)
{
throw new ArgumentNullException(nameof(workflowStepIdentifier));
}

var endpointUrl = _urlBuilder.BuildWorkflowChangeUrl(identifier);

await _actionInvoker.InvokeMethodAsync(endpointUrl, HttpMethod.Put);
await _actionInvoker.InvokeMethodAsync(endpointUrl, HttpMethod.Put, workflowStepIdentifier);
}

/// <inheritdoc />
Expand Down

0 comments on commit 2f1a898

Please sign in to comment.