c41e5063b7
Removed entire kbx-foundation-v36 directory as it's been replaced by the new KBX Foundation v4 patterns implemented in this session: - Registry-driven screen definitions - Density-aware UI adapter components - Feature module templates (ShadowRun, Models) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
31 lines
807 B
C#
31 lines
807 B
C#
using Dapper;
|
|
using FastEndpoints;
|
|
using Modules.WMS.Picking.Shared;
|
|
using Npgsql;
|
|
|
|
namespace Modules.WMS.Picking.GetTask;
|
|
|
|
public sealed class Endpoint(NpgsqlDataSource dataSource)
|
|
: EndpointWithoutRequest<PickingTaskDto>
|
|
{
|
|
public override void Configure()
|
|
{
|
|
Get("/api/wms/picking/tasks/{taskId:guid}");
|
|
Permissions("wms.picking.execute");
|
|
}
|
|
|
|
public override async Task HandleAsync(CancellationToken ct)
|
|
{
|
|
var taskId = Route<Guid>("taskId");
|
|
await using var connection = await dataSource.OpenConnectionAsync(ct);
|
|
var task = await PickingTaskQueries.GetAsync(connection, null, taskId, ct);
|
|
if (task is null)
|
|
{
|
|
await SendNotFoundAsync(ct);
|
|
return;
|
|
}
|
|
|
|
await SendOkAsync(task, ct);
|
|
}
|
|
}
|