const Permission = require('../models/Permission');

exports.getPermissions = async (req, res) => {
  try {
    const permissions = await Permission.find(); // Fetch all permissions
    res.status(200).json(permissions);
  } catch (error) {
    res.status(500).json({ message: 'Error fetching permissions', error: error.message });
  }
};
