const express = require('express');
const router = express.Router();
const { authenticate } = require('../middlewares/auth');
const fabricatorController = require('../controllers/fabricatorController');

// All routes require authentication
router.use(authenticate);

// Get all fabricators
router.get('/', fabricatorController.getAll);

// Get by ID
router.get('/:id', fabricatorController.getById);

// Create
router.post('/', fabricatorController.create);

// Update
router.put('/:id', fabricatorController.update);

// Delete
router.delete('/:id', fabricatorController.delete);

module.exports = router;
