diff --git a/src/ReC.Application/Common/Dto/RecActionDto.cs b/src/ReC.Application/Common/Dto/RecActionDto.cs index 4395e59..800de52 100644 --- a/src/ReC.Application/Common/Dto/RecActionDto.cs +++ b/src/ReC.Application/Common/Dto/RecActionDto.cs @@ -27,7 +27,7 @@ public record RecActionDto public string? EndpointAuthApiValue { get; init; } - public string? EndpointAuthApiKeyAddTo { get; init; } + public ApiKeyLocation? EndpointAuthApiKeyAddTo { get; init; } public string? EndpointAuthToken { get; init; } diff --git a/src/ReC.Application/RecActions/Commands/InvokeRecActionCommand.cs b/src/ReC.Application/RecActions/Commands/InvokeRecActionCommand.cs index 0bd9114..6a3fced 100644 --- a/src/ReC.Application/RecActions/Commands/InvokeRecActionCommand.cs +++ b/src/ReC.Application/RecActions/Commands/InvokeRecActionCommand.cs @@ -5,6 +5,7 @@ using ReC.Application.Common.Constants; using ReC.Application.Common.Dto; using ReC.Application.Common.Exceptions; using ReC.Application.OutResults.Commands; +using ReC.Domain.Constants; using System.Net; using System.Net.Http.Headers; using System.Text; @@ -63,7 +64,7 @@ public class InvokeRecActionCommandHandler( case "API Key": if (action.EndpointAuthApiKey is string apiKey && action.EndpointAuthApiValue is string apiValue) { - if (action.EndpointAuthApiKeyAddTo == "Header") + if (action.EndpointAuthApiKeyAddTo == ApiKeyLocation.Header) { httpReq.Headers.Add(apiKey, apiValue); }