Refactor API key location to use enum for type safety

Updated EndpointAuth and RecActionView to use the ApiKeyLocation enum for API key location properties instead of nullable strings. Added necessary using directives for ReC.Domain.Constants to support this change, improving type safety and code clarity.
This commit is contained in:
2025-12-12 13:16:32 +01:00
parent 1f250d55b0
commit 6d04a4afd1
2 changed files with 6 additions and 4 deletions

View File

@@ -1,4 +1,5 @@
using System.ComponentModel.DataAnnotations;
using ReC.Domain.Constants;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace ReC.Domain.Entities;
@@ -17,7 +18,7 @@ public class EndpointAuth
public string? ApiValue { get; set; }
public string? ApiKeyAddTo { get; set; }
public ApiKeyLocation? ApiKeyAddTo { get; set; }
public string? Token { get; set; }

View File

@@ -1,4 +1,5 @@
using System.ComponentModel.DataAnnotations;
using ReC.Domain.Constants;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace ReC.Domain.Entities;
@@ -42,7 +43,7 @@ public class RecActionView
public string? EndpointAuthApiValue { get; set; }
public string? EndpointAuthApiKeyAddTo { get; set; }
public ApiKeyLocation? EndpointAuthApiKeyAddTo { get; set; }
public string? EndpointAuthToken { get; set; }