export const createResourceController = (resourceName) => ({
  list: (req, res) => {
    res.json({
      message: `${resourceName} list endpoint ready.`,
      resource: resourceName,
      items: [],
    });
  },
  getById: (req, res) => {
    res.json({
      message: `${resourceName} detail endpoint ready.`,
      resource: resourceName,
      id: req.params.id,
    });
  },
  create: (req, res) => {
    res.status(201).json({
      message: `${resourceName} create endpoint ready.`,
      resource: resourceName,
      payload: req.body,
    });
  },
  update: (req, res) => {
    res.json({
      message: `${resourceName} update endpoint ready.`,
      resource: resourceName,
      id: req.params.id,
      payload: req.body,
    });
  },
  remove: (req, res) => {
    res.status(204).send();
  },
});

