Tests voor client api and service
This commit is contained in:
parent
cd2ec646fd
commit
3d73a9914c
12 changed files with 267 additions and 30 deletions
|
|
@ -7,8 +7,9 @@ public class ClientIdValidationFilter(IClientService clientService) : IEndpointF
|
|||
{
|
||||
public async ValueTask<object?> InvokeAsync(EndpointFilterInvocationContext context, EndpointFilterDelegate next)
|
||||
{
|
||||
Guid realmId = context.Arguments.OfType<Guid>().First();
|
||||
int id = context.Arguments.OfType<int>().First();
|
||||
Client? client = await clientService.FindById(id, context.HttpContext.RequestAborted);
|
||||
Client? client = await clientService.FindById(realmId, id, context.HttpContext.RequestAborted);
|
||||
if (client is null)
|
||||
{
|
||||
return Results.NotFound();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue