feat: basic api

This commit is contained in:
eneller
2026-03-05 23:31:56 +01:00
parent cef3474c3d
commit 0dd4b6590d
7 changed files with 83 additions and 10 deletions

View File

@@ -0,0 +1,17 @@
import express from 'express';
import { Transaction } from "@shared/interfaces/transaction"
const router = express.Router();
// Mock data
const mockTransactions: Transaction[] = [
{ id: '1', partner: 'Alice Smith', amount: 50.00, date: new Date('2026-03-01'), type: 'Received' },
{ id: '2', partner: 'Bob Johnson', amount: -25.50, date: new Date('2026-02-28'), type: 'Sent' },
];
// GET /api/transactions
router.get('/', (req, res) => {
res.json(mockTransactions);
});
export default router;