diff --git a/WebfrontCore/Controllers/InteractionController.cs b/WebfrontCore/Controllers/InteractionController.cs index 16a69c91..a006feae 100644 --- a/WebfrontCore/Controllers/InteractionController.cs +++ b/WebfrontCore/Controllers/InteractionController.cs @@ -7,13 +7,19 @@ using SharedLibraryCore.Interfaces; namespace WebfrontCore.Controllers; -public class InteractionController(IManager manager, IInteractionRegistration interactionRegistration) - : BaseController(manager) +public class InteractionController : BaseController { + private readonly IInteractionRegistration _interactionRegistration; + + public InteractionController(IManager manager, IInteractionRegistration interactionRegistration) : base(manager) + { + _interactionRegistration = interactionRegistration; + } + [HttpGet("[controller]/[action]/{interactionName}")] public async Task Render([FromRoute]string interactionName, CancellationToken token) { - var interactionData = (await interactionRegistration.GetInteractions(interactionName, token: token)).FirstOrDefault(); + var interactionData = (await _interactionRegistration.GetInteractions(interactionName, token: token)).FirstOrDefault(); if (interactionData is null) { @@ -27,7 +33,7 @@ public class InteractionController(IManager manager, IInteractionRegistration in ViewBag.Title = interactionData.Description; var meta = HttpContext.Request.Query.ToDictionary(key => key.Key, value => value.Value.ToString()); - var result = await interactionRegistration.ProcessInteraction(interactionName, Client.ClientId, meta: meta, token: token); + var result = await _interactionRegistration.ProcessInteraction(interactionName, Client.ClientId, meta: meta, token: token); if (interactionData.InteractionType == InteractionType.TemplateContent) {