mirror of
https://github.com/acedanger/finance.git
synced 2025-12-06 07:00:13 -08:00
Remove unused files and implement API routes for account and transaction management
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import type { APIRoute } from "astro";
|
||||
import { transactions } from "../../../../../data/store";
|
||||
|
||||
export const GET: APIRoute = async ({ params }) => {
|
||||
const accountTransactions = transactions.filter(
|
||||
(t) => t.accountId === params.id
|
||||
);
|
||||
|
||||
return new Response(JSON.stringify(accountTransactions), {
|
||||
status: 200,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user