Replace in-memory store with database persistence

- Remove in-memory store and related tests
- Add Decimal to number conversion in API responses
- Update integration tests to handle Prisma Decimal type
- Fix test configuration to only run db-integration tests
This commit is contained in:
GitHub Copilot
2025-05-06 08:31:15 +00:00
parent 07fbb82385
commit a5dcad1486
9 changed files with 34 additions and 499 deletions

View File

@@ -69,7 +69,13 @@ export const POST: APIRoute = async ({ request }) => {
tags: transaction.tags,
});
return new Response(JSON.stringify(newTransaction), {
// Convert Decimal to number for response
const response = {
...newTransaction,
amount: Number(newTransaction.amount),
};
return new Response(JSON.stringify(response), {
status: 201,
headers: { 'Content-Type': 'application/json' },
});