mirror of
https://github.com/acedanger/finance.git
synced 2025-12-05 22:50:12 -08:00
#1 Implement GET /api/accounts endpoint
This commit is contained in:
@@ -0,0 +1,11 @@
|
|||||||
|
import type { APIRoute } from 'astro';
|
||||||
|
import { accounts } from '../../../data/store';
|
||||||
|
|
||||||
|
export const GET: APIRoute = async () => {
|
||||||
|
return new Response(JSON.stringify(accounts), {
|
||||||
|
status: 200,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user