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.
This commit is contained in:
parent
94561fe014
commit
1a0da4140b
@ -54,7 +54,8 @@ public class RecActionController(IMediator mediator) : ControllerBase
|
|||||||
Type = type,
|
Type = type,
|
||||||
BodyQuery = $@"SELECT '{bodyJson ?? "NULL"}' AS REQUEST_BODY;",
|
BodyQuery = $@"SELECT '{bodyJson ?? "NULL"}' AS REQUEST_BODY;",
|
||||||
HeaderQuery = headerJson is not null ? $@"SELECT '{headerJson}' AS REQUEST_HEADER;" : null,
|
HeaderQuery = headerJson is not null ? $@"SELECT '{headerJson}' AS REQUEST_HEADER;" : null,
|
||||||
Active = true
|
Active = true,
|
||||||
|
EndpointAuthId = 1
|
||||||
}, cancel);
|
}, cancel);
|
||||||
|
|
||||||
return CreatedAtAction(nameof(CreateFakeAction), null);
|
return CreatedAtAction(nameof(CreateFakeAction), null);
|
||||||
|
|||||||
@ -23,6 +23,8 @@ public record CreateRecActionCommand : IRequest
|
|||||||
public string BodyQuery { get; init; } = null!;
|
public string BodyQuery { get; init; } = null!;
|
||||||
|
|
||||||
public byte Sequence { get; set; } = 1;
|
public byte Sequence { get; set; } = 1;
|
||||||
|
|
||||||
|
public long? EndpointAuthId { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class CreateRecActionCommandHandler(ISender sender, IRepository<RecAction> repo) : IRequestHandler<CreateRecActionCommand>
|
public class CreateRecActionCommandHandler(ISender sender, IRepository<RecAction> repo) : IRequestHandler<CreateRecActionCommand>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user