mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-08 06:08:20 -05:00
Revert primary constructor change
This commit is contained in:
parent
b286548906
commit
0f135337a9
@ -7,13 +7,19 @@ using SharedLibraryCore.Interfaces;
|
|||||||
|
|
||||||
namespace WebfrontCore.Controllers;
|
namespace WebfrontCore.Controllers;
|
||||||
|
|
||||||
public class InteractionController(IManager manager, IInteractionRegistration interactionRegistration)
|
public class InteractionController : BaseController
|
||||||
: BaseController(manager)
|
|
||||||
{
|
{
|
||||||
|
private readonly IInteractionRegistration _interactionRegistration;
|
||||||
|
|
||||||
|
public InteractionController(IManager manager, IInteractionRegistration interactionRegistration) : base(manager)
|
||||||
|
{
|
||||||
|
_interactionRegistration = interactionRegistration;
|
||||||
|
}
|
||||||
|
|
||||||
[HttpGet("[controller]/[action]/{interactionName}")]
|
[HttpGet("[controller]/[action]/{interactionName}")]
|
||||||
public async Task<IActionResult> Render([FromRoute]string interactionName, CancellationToken token)
|
public async Task<IActionResult> 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)
|
if (interactionData is null)
|
||||||
{
|
{
|
||||||
@ -27,7 +33,7 @@ public class InteractionController(IManager manager, IInteractionRegistration in
|
|||||||
|
|
||||||
ViewBag.Title = interactionData.Description;
|
ViewBag.Title = interactionData.Description;
|
||||||
var meta = HttpContext.Request.Query.ToDictionary(key => key.Key, value => value.Value.ToString());
|
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)
|
if (interactionData.InteractionType == InteractionType.TemplateContent)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user