- gRPC auth service for token validation - Value comparator system (string, numeric, boolean, datetime, collection) - Condition evaluator with strategy chain - Form definition and data improvements - Workflow instance/task endpoints updated - Seed data and EF design-time factory - Test coverage for comparators and handlers
36 lines
933 B
C#
36 lines
933 B
C#
using FastEndpoints;
|
|
using MediatR;
|
|
using Workflow.Application.Features.WorkflowTasks.DTOs;
|
|
using Workflow.Application.Features.WorkflowTasks.Queries;
|
|
|
|
namespace Workflow.Api.Endpoints.WorkflowTask;
|
|
|
|
public class GetTaskByIdEndpoint : Endpoint<GetTaskByIdRequest, WorkflowTaskListItemDto>
|
|
{
|
|
private readonly IMediator _mediator;
|
|
|
|
public GetTaskByIdEndpoint(IMediator mediator) => _mediator = mediator;
|
|
|
|
public override void Configure()
|
|
{
|
|
Get("/workflow-tasks/{Id}");
|
|
AllowAnonymous();
|
|
Summary(s =>
|
|
{
|
|
s.Summary = "Get task detail by id";
|
|
});
|
|
}
|
|
|
|
public override async Task HandleAsync(GetTaskByIdRequest req, CancellationToken ct)
|
|
{
|
|
var query = new GetTaskByIdQuery(req.Id);
|
|
var result = await _mediator.Send(query, ct);
|
|
await Send.OkAsync(result, ct);
|
|
}
|
|
}
|
|
|
|
public class GetTaskByIdRequest
|
|
{
|
|
public Guid Id { get; set; }
|
|
}
|