fix: invert backend sorting to make new payloads appear first and fix group sorting
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 51s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 51s
This commit is contained in:
@@ -87,7 +87,7 @@ const formatRow = (row) => ({
|
||||
// GET data (for the frontend)
|
||||
app.get('/api/data', verifyToken, async (req, res) => {
|
||||
try {
|
||||
const result = await pool.query('SELECT * FROM orders ORDER BY id ASC');
|
||||
const result = await pool.query('SELECT * FROM orders ORDER BY id DESC');
|
||||
const formattedData = result.rows.map(formatRow);
|
||||
res.json(formattedData);
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user