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:
@@ -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; }
|
||||
|
||||
|
||||
@@ -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; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user