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

async function getActive(req, res) {
  try {
    const rows = await projectModel.findActive();
    res.json({ success: true, data: rows });
  } catch (err) {
    console.error('Project getActive error:', err);
    res.status(500).json({ success: false, error: err.message });
  }
}

module.exports = { getActive };
