Skip to content

Commit 4adb47d

Browse files
committed
Make methods async
1 parent b2ba332 commit 4adb47d

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/Umbraco.Commerce.Checkout/Services/InstallService.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System.Threading.Tasks;
12
using Umbraco.Commerce.Checkout.Pipeline;
23
using Umbraco.Commerce.Common.Pipelines;
34
using Umbraco.Commerce.Core.Models;
@@ -7,7 +8,7 @@ namespace Umbraco.Commerce.Checkout.Services
78
{
89
public class InstallService
910
{
10-
public void Install(int siteRootNodeId, StoreReadOnly store)
11+
public async Task InstallAsync(int siteRootNodeId, StoreReadOnly store)
1112
{
1213
PipelineResult<InstallPipelineContext> result = PipelineRunner.Invoke<InstallPipeline, InstallPipelineContext>(new InstallPipelineContext
1314
{

src/Umbraco.Commerce.Checkout/Web/Controllers/UmbracoCommerceCheckoutApiController.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.Threading.Tasks;
23
using Asp.Versioning;
34
using Microsoft.AspNetCore.Mvc;
45
using Umbraco.Cms.Api.Management.Routing;
@@ -29,7 +30,7 @@ public UmbracoCommerceCheckoutApiController(
2930
}
3031

3132
[HttpGet("install")]
32-
public object InstallUmbracoCommerceCheckout(Guid? siteRootNodeId)
33+
public async Task<object> InstallUmbracoCommerceCheckout(Guid? siteRootNodeId)
3334
{
3435
ArgumentNullException.ThrowIfNull(siteRootNodeId);
3536

@@ -53,7 +54,7 @@ public object InstallUmbracoCommerceCheckout(Guid? siteRootNodeId)
5354
}
5455

5556
// Perform the install
56-
new InstallService().Install(siteRootNode.Id, store);
57+
await new InstallService().InstallAsync(siteRootNode.Id, store).ConfigureAwait(false);
5758

5859
// Return success
5960
return new { success = true };

0 commit comments

Comments
 (0)