Creating a Journal Reversal handler.

This commit is contained in:
brianj committed 2026-07-15 17:29:02 +02:00
1 parent 0376b58a33
commit e109c1c695
7 files changed
+122 -6

No files matched your search

@@ -21,6 +21,7 @@ builder.Services.AddDbContext<AccountDbContext>(options =>
options.UseSqlite(connectionString));
builder.Services.AddScoped<IAccountQuery, AccountQuery>();
builder.Services.AddScoped<IReversalQuery, ReversalQuery>();
// Add services to the container.
// Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi
@@ -67,4 +68,10 @@ app.MapPost("/accounts/transfer", async (TransferFundsCommand cmd, IMessageBus b
return Results.Accepted();
});
app.MapPost("/journal/reverse", async (ReverseJournalCommand cmd, IMessageBus bus) =>
{
await bus.InvokeAsync(cmd);
return Results.Accepted();
});
app.Run();