const express = require('express');
const { authenticate, authorize } = require('../middleware/auth');
const StopController = require('../controllers/StopController');

const router = express.Router();

router.get('/', StopController.getAll);
router.get('/route/:routeId', StopController.getByRoute);
router.post('/', authenticate, authorize('admin', 'manager'), StopController.create);

module.exports = router;
