You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
371 B
12 lines
371 B
const { pool } = require('../config/databases');
|
|
|
|
exports.index = async (req, res) => {
|
|
try {
|
|
const [transactions] = await pool.query(
|
|
'SELECT * FROM transactions ORDER BY date_transaction DESC'
|
|
);
|
|
res.render('transactions/transactions_content', { transactions });
|
|
} catch (err) {
|
|
res.status(500).send('Erreur serveur : ' + err.message);
|
|
}
|
|
};
|
|
|