Added order
This commit is contained in:
@@ -2,7 +2,7 @@ const { Position } = require('../models');
|
||||
|
||||
const getAllPositions = async (req, res) => {
|
||||
try {
|
||||
const positions = await Position.findAll();
|
||||
const positions = await Position.findAll({order: [['caption', 'ASC']]});
|
||||
res.json(positions);
|
||||
} catch (error) {
|
||||
res.status(500).json({ error: 'Failed to fetch positions' });
|
||||
|
||||
Reference in New Issue
Block a user