Skip to content

Commit 8e6814b

Browse files
committed
Update mapping service instantiation.
1 parent 38e66b3 commit 8e6814b

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/Umbraco.Forms.Integrations.Automation.Zapier/ZapierWorkflow.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,17 @@
77
using Umbraco.Forms.Core.Persistence.Dtos;
88
using Umbraco.Forms.Integrations.Automation.Zapier.Services;
99
using Umbraco.Forms.Integrations.Automation.Zapier.Validators;
10+
using Umbraco.Web;
1011

1112
namespace Umbraco.Forms.Integrations.Automation.Zapier
1213
{
1314
public class ZapierWorkflow : WorkflowType
1415
{
15-
private readonly IMappingService _mappingService;
16+
private readonly IUmbracoContextAccessor _umbracoContextAccessor;
1617

17-
public ZapierWorkflow(IMappingService mappingService)
18+
public ZapierWorkflow(IUmbracoContextAccessor umbracoContextAccessor)
1819
{
19-
_mappingService = mappingService;
20+
_umbracoContextAccessor = umbracoContextAccessor;
2021

2122
Name = "Trigger Zap";
2223
Id = new Guid("d05b95e5-86f8-4c31-99b8-4ec7fc62a787");
@@ -49,7 +50,9 @@ public override WorkflowExecutionStatus Execute(Record record, RecordEventArgs e
4950
{
5051
try
5152
{
52-
var content = _mappingService
53+
IMappingService mappingService = new MappingService(_umbracoContextAccessor);
54+
55+
var content = mappingService
5356
.IncludeFieldsMappings(Mappings, e)
5457
.IncludeStandardFieldsMappings(StandardFieldsMappings, e)
5558
.Map();

0 commit comments

Comments
 (0)