Files
kjh2064 3f293d8aa8
deploy / deploy (push) Successful in 1m52s
deploy / notify (push) Successful in 1s
V13-FE-006: consolidate approved UI and contract hardening
2026-08-13 02:41:00 +09:00

14 lines
695 B
C#

using FastEndpoints;
using Kbx.Shared.Telemetry;
namespace Kbx.Modules.Common.UxTelemetry.Ingest;
public sealed class Endpoint(KbxUxTelemetryRepository repository) : Endpoint<KbxUxEventBatchRequest>
{
public override void Configure(){Post("/api/kbx/ux/events");Permissions("common.telemetry.write");}
public override async Task HandleAsync(KbxUxEventBatchRequest req,CancellationToken ct)
{
// Replace with the deployment's authenticated tenant accessor.
var tenantId=Kbx.Shared.Runtime.RuntimeIdentity.TenantId(User);
await repository.AppendAsync(tenantId,Kbx.Shared.Runtime.RuntimeIdentity.UserId(User),req.Events,ct);await Send.NoContentAsync(ct);
}
}