basic login/logout
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import express from 'express';
|
||||
import { logger } from '../util/logging';
|
||||
import Transaction from '../model/transaction';
|
||||
|
||||
const router = express.Router();
|
||||
@@ -8,7 +9,7 @@ router.get('/', async (req, res) => {
|
||||
const transactions = await Transaction.findAll({ limit: 10 });
|
||||
res.json(transactions);
|
||||
} catch (err) {
|
||||
console.error('Failed to fetch transactions:', err);
|
||||
logger.error('Failed to fetch transactions:', err);
|
||||
res.status(500).json({ error: 'Failed to fetch transactions' });
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user