const express = require('express');
const router = express.Router();
const masmSchemeController = require('../controllers/masmSchemeController');
const requireAdmin = require('../middleware/adminMiddleware');

// Get all MASM schemes (public - needed for client creation)
router.get('/', masmSchemeController.getAll);

// Get MASM scheme by ID (public - needed for client creation)
router.get('/:id', masmSchemeController.getById);

// Create new MASM scheme (admin only)
router.post('/', requireAdmin, masmSchemeController.create);

// Update MASM scheme (admin only)
router.put('/:id', requireAdmin, masmSchemeController.update);

// Delete MASM scheme (admin only)
router.delete('/:id', requireAdmin, masmSchemeController.delete);

module.exports = router;



