Genral clean up and moving of code.

This commit is contained in:
2026-07-30 17:01:33 +02:00
parent b37ca9222d
commit 2abe392890
19 changed files with 141 additions and 18 deletions
@@ -1,13 +0,0 @@
using FinancialApi.Application.Events;
namespace FinancialApi;
public class DemoEventStore : IEventTracker
{
public List<string> CapturedEvents { get; } = new();
public void Add(string eventMessage)
{
CapturedEvents.Add($"[{DateTimeOffset.UtcNow:HH:mm:ss}] {eventMessage}");
}
}
@@ -1,3 +1,4 @@
using FinancialApi.Domain.Exceptions;
using Microsoft.AspNetCore.Diagnostics;
using Microsoft.AspNetCore.Mvc;
@@ -11,7 +12,7 @@ public class DomainExceptionHandler : IExceptionHandler
CancellationToken cancellationToken
)
{
if (exception is not (InvalidOperationException or ArgumentException))
if (exception is not (InvalidOperationException or ArgumentException or GaapViolationException))
{
return false;
}
@@ -7,8 +7,8 @@ Accept: application/json
Content-Type: application/json
{
"accountId": 1,
"amount": 50.0
"accountId": 2,
"amount": 100
}
### Transfer Between Accounts
@@ -28,7 +28,7 @@ POST {{FinancialApi_HostAddress}}/journal/reverse
Content-Type: application/json
{
"originalJournalId": "B65EB28C-7EC1-4B70-9069-06A61A4FE857",
"originalJournalId": "E7FB25DB-406F-4063-A4B0-DE6BB8292437",
"reason": "Incorrect Account Fee"
}
@@ -1,8 +1,8 @@
using FinancialApi;
using FinancialApi.Application.Commands;
using FinancialApi.Application.Events;
using FinancialApi.Application.Handlers;
using FinancialApi.Application.Interfaces;
using FinancialApi.Domain.Events;
using FinancialApi.Infrastructure;
using FinancialApi.ServiceDefaults;
using JasperFx.Resources;