From 1a0da4140b11a909c197ce651cd89f2705d614f1 Mon Sep 17 00:00:00 2001 From: TekH Date: Wed, 3 Dec 2025 13:43:08 +0100 Subject: [PATCH] Add EndpointAuthId to support endpoint authentication Introduced a new `EndpointAuthId` property in `RecActionController` and `CreateRecActionCommand` to enable handling of endpoint authentication. Updated the `RecActionController` to initialize `EndpointAuthId` with a default value of `1`. Modified the `CreateRecActionCommand` record to include a nullable `EndpointAuthId` property of type `long?`, allowing optional specification of authentication details. --- src/ReC.API/Controllers/RecActionController.cs | 3 ++- .../RecActions/Commands/CreateRecActionCommand.cs | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ReC.API/Controllers/RecActionController.cs b/src/ReC.API/Controllers/RecActionController.cs index 9f90ce0..402867f 100644 --- a/src/ReC.API/Controllers/RecActionController.cs +++ b/src/ReC.API/Controllers/RecActionController.cs @@ -54,7 +54,8 @@ public class RecActionController(IMediator mediator) : ControllerBase Type = type, BodyQuery = $@"SELECT '{bodyJson ?? "NULL"}' AS REQUEST_BODY;", HeaderQuery = headerJson is not null ? $@"SELECT '{headerJson}' AS REQUEST_HEADER;" : null, - Active = true + Active = true, + EndpointAuthId = 1 }, cancel); return CreatedAtAction(nameof(CreateFakeAction), null); diff --git a/src/ReC.Application/RecActions/Commands/CreateRecActionCommand.cs b/src/ReC.Application/RecActions/Commands/CreateRecActionCommand.cs index 0530c2a..28816be 100644 --- a/src/ReC.Application/RecActions/Commands/CreateRecActionCommand.cs +++ b/src/ReC.Application/RecActions/Commands/CreateRecActionCommand.cs @@ -23,6 +23,8 @@ public record CreateRecActionCommand : IRequest public string BodyQuery { get; init; } = null!; public byte Sequence { get; set; } = 1; + + public long? EndpointAuthId { get; set; } } public class CreateRecActionCommandHandler(ISender sender, IRepository repo) : IRequestHandler