Add production orders page
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m20s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m20s
This commit is contained in:
16
backend/routes/productionOrderRoutes.js
Normal file
16
backend/routes/productionOrderRoutes.js
Normal file
@@ -0,0 +1,16 @@
|
||||
const express = require('express');
|
||||
const { verifyToken } = require('../auth');
|
||||
const { listProductionOrders } = require('../services/productionOrderService');
|
||||
|
||||
const router = express.Router();
|
||||
|
||||
router.get('/production-orders', verifyToken, async (req, res) => {
|
||||
try {
|
||||
res.json(await listProductionOrders(req.query || {}));
|
||||
} catch (error) {
|
||||
console.error('Error fetching production orders:', error);
|
||||
res.status(500).json({ error: 'Internal Server Error' });
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = router;
|
||||
Reference in New Issue
Block a user